jodit 4.2.40 → 4.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +118 -53
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +118 -53
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.css +1 -1
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +118 -53
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +118 -53
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/164.fat.min.js +1 -1
- package/es5/164.min.js +1 -1
- package/es5/5.fat.min.js +1 -1
- package/es5/5.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +119 -55
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/utils/complete-url.d.ts +0 -3
- package/esm/core/helpers/utils/complete-url.js +1 -1
- package/esm/core/helpers/utils/convert-media-url-to-video-embed.d.ts +4 -1
- package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +7 -3
- package/esm/core/selection/style/api/extract.js +1 -0
- package/esm/jodit.d.ts +11 -1
- package/esm/jodit.js +11 -1
- package/esm/modules/history/snapshot.d.ts +1 -0
- package/esm/modules/history/snapshot.js +8 -1
- package/esm/modules/toolbar/button/button.js +18 -9
- package/esm/plugins/ai-assistant/langs/index.d.ts +3 -0
- package/esm/plugins/ai-assistant/langs/index.js +3 -0
- package/esm/plugins/clean-html/config.d.ts +9 -0
- package/esm/plugins/image-properties/readers/align.d.ts +3 -1
- package/esm/plugins/image-properties/readers/align.js +3 -1
- package/esm/plugins/image-properties/readers/index.d.ts +3 -0
- package/esm/plugins/image-properties/readers/link.d.ts +3 -0
- package/esm/plugins/image-properties/readers/margin.js +3 -0
- package/esm/plugins/image-properties/readers/size.js +3 -0
- package/esm/plugins/image-properties/ui/ui-image-form.d.ts +3 -0
- package/esm/plugins/image-properties/ui/ui-image-main-tab.d.ts +3 -0
- package/esm/plugins/image-properties/ui/ui-image-position-tab.d.ts +3 -0
- package/esm/plugins/image-properties/utils/open-image-editor.d.ts +3 -0
- package/esm/plugins/image-properties/utils/open-image-popup.d.ts +3 -0
- package/esm/plugins/image-properties/utils/utils.js +3 -0
- package/esm/plugins/image-properties/writers/index.d.ts +3 -0
- package/esm/plugins/image-properties/writers/link.d.ts +3 -0
- package/esm/plugins/image-properties/writers/margin.d.ts +3 -0
- package/esm/plugins/image-properties/writers/size.js +3 -0
- package/esm/plugins/link/link.js +6 -2
- package/esm/plugins/symbols/config.js +6 -7
- package/esm/plugins/symbols/symbols.d.ts +1 -3
- package/esm/plugins/symbols/symbols.js +16 -11
- package/esm/plugins/video/config.d.ts +29 -0
- package/esm/plugins/video/config.js +26 -17
- package/esm/plugins/wrap-nodes/config.d.ts +5 -1
- package/esm/types/history.d.ts +3 -0
- package/package.json +1 -1
- package/types/core/helpers/utils/complete-url.d.ts +0 -3
- package/types/core/helpers/utils/convert-media-url-to-video-embed.d.ts +4 -1
- package/types/jodit.d.ts +11 -1
- package/types/modules/history/snapshot.d.ts +1 -0
- package/types/plugins/ai-assistant/langs/index.d.ts +3 -0
- package/types/plugins/clean-html/config.d.ts +9 -0
- package/types/plugins/image-properties/readers/align.d.ts +3 -1
- package/types/plugins/image-properties/readers/index.d.ts +3 -0
- package/types/plugins/image-properties/readers/link.d.ts +3 -0
- package/types/plugins/image-properties/ui/ui-image-form.d.ts +3 -0
- package/types/plugins/image-properties/ui/ui-image-main-tab.d.ts +3 -0
- package/types/plugins/image-properties/ui/ui-image-position-tab.d.ts +3 -0
- package/types/plugins/image-properties/utils/open-image-editor.d.ts +3 -0
- package/types/plugins/image-properties/utils/open-image-popup.d.ts +3 -0
- package/types/plugins/image-properties/writers/index.d.ts +3 -0
- package/types/plugins/image-properties/writers/link.d.ts +3 -0
- package/types/plugins/image-properties/writers/margin.d.ts +3 -0
- package/types/plugins/symbols/symbols.d.ts +1 -3
- package/types/plugins/video/config.d.ts +29 -0
- package/types/plugins/wrap-nodes/config.d.ts +5 -1
- package/types/types/history.d.ts +3 -0
package/es2018/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.2.
|
|
4
|
+
* Version: v4.2.43
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1735,7 +1735,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1735
1735
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1736
1736
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1737
1737
|
*/
|
|
1738
|
-
const APP_VERSION = "4.2.
|
|
1738
|
+
const APP_VERSION = "4.2.43";
|
|
1739
1739
|
// prettier-ignore
|
|
1740
1740
|
const ES = "es2018";
|
|
1741
1741
|
const IS_ES_MODERN = true;
|
|
@@ -7550,10 +7550,10 @@ const buildQuery = (data, prefix) => {
|
|
|
7550
7550
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
7551
7551
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
7552
7552
|
*/
|
|
7553
|
-
|
|
7554
7553
|
/**
|
|
7555
7554
|
* @module helpers/utils
|
|
7556
7555
|
*/
|
|
7556
|
+
|
|
7557
7557
|
const completeUrl = (url) => {
|
|
7558
7558
|
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
|
|
7559
7559
|
url = 'https:' + url;
|
|
@@ -7689,11 +7689,12 @@ function ConfigFlatten(obj) {
|
|
|
7689
7689
|
/**
|
|
7690
7690
|
* Javascript url pattern converter replace youtube/vimeo url in embed code.
|
|
7691
7691
|
*/
|
|
7692
|
-
const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
7692
|
+
const convertMediaUrlToVideoEmbed = (url, { width = 400, height = 345 } = {}) => {
|
|
7693
7693
|
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
|
|
7694
7694
|
return url;
|
|
7695
7695
|
}
|
|
7696
|
-
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a')
|
|
7696
|
+
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
|
|
7697
|
+
const pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
|
|
7697
7698
|
parser.href = url;
|
|
7698
7699
|
if (!width) {
|
|
7699
7700
|
width = 400;
|
|
@@ -7720,7 +7721,10 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
|
7720
7721
|
case 'www.youtu.be': {
|
|
7721
7722
|
const query = parser.search
|
|
7722
7723
|
? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
|
|
7723
|
-
: { v: parser.pathname.
|
|
7724
|
+
: { v: parser.pathname.substring(1) };
|
|
7725
|
+
if (/^embed\/.*/.test(query.v)) {
|
|
7726
|
+
query.v = query.v.substring(6);
|
|
7727
|
+
}
|
|
7724
7728
|
return query.v
|
|
7725
7729
|
? '<iframe width="' +
|
|
7726
7730
|
width +
|
|
@@ -11280,6 +11284,7 @@ function extractSelectedPart(wrapper, font, jodit) {
|
|
|
11280
11284
|
}
|
|
11281
11285
|
/**
|
|
11282
11286
|
* Retrieves content before after the selected area, clears it if it is empty, and inserts before after the framed selection
|
|
11287
|
+
* @private
|
|
11283
11288
|
*/
|
|
11284
11289
|
function extractAndMove(wrapper, range, left) {
|
|
11285
11290
|
const fragment = range.extractContents();
|
|
@@ -16396,7 +16401,17 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16396
16401
|
: jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.defaultOptions.defaultTimeout;
|
|
16397
16402
|
}
|
|
16398
16403
|
/**
|
|
16399
|
-
* Method wrap usual
|
|
16404
|
+
* Method wrap usual object in Object helper for prevent deep object merging in options*
|
|
16405
|
+
* ```js
|
|
16406
|
+
* const editor = Jodit.make('#editor', {
|
|
16407
|
+
* controls: {
|
|
16408
|
+
* fontsize: {
|
|
16409
|
+
* list: Jodit.atom([8, 9, 10])
|
|
16410
|
+
* }
|
|
16411
|
+
* }
|
|
16412
|
+
* });
|
|
16413
|
+
* ```
|
|
16414
|
+
* In this case, the array [8, 9, 10] will not be combined with other arrays, but will replace them
|
|
16400
16415
|
*/
|
|
16401
16416
|
static atom(object) {
|
|
16402
16417
|
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markAsAtomic)(object);
|
|
@@ -20961,6 +20976,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20961
20976
|
constructor() {
|
|
20962
20977
|
super(...arguments);
|
|
20963
20978
|
this.__isBlocked = false;
|
|
20979
|
+
this.__levelOfTransaction = 0;
|
|
20964
20980
|
}
|
|
20965
20981
|
/** @override */
|
|
20966
20982
|
className() {
|
|
@@ -21041,6 +21057,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
21041
21057
|
}
|
|
21042
21058
|
transaction(changes) {
|
|
21043
21059
|
this.__block(true);
|
|
21060
|
+
this.__levelOfTransaction += 1;
|
|
21044
21061
|
try {
|
|
21045
21062
|
changes();
|
|
21046
21063
|
}
|
|
@@ -21049,7 +21066,12 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
21049
21066
|
throw e;
|
|
21050
21067
|
}
|
|
21051
21068
|
}
|
|
21052
|
-
|
|
21069
|
+
finally {
|
|
21070
|
+
this.__levelOfTransaction -= 1;
|
|
21071
|
+
if (this.__levelOfTransaction === 0) {
|
|
21072
|
+
this.__block(false);
|
|
21073
|
+
}
|
|
21074
|
+
}
|
|
21053
21075
|
}
|
|
21054
21076
|
/**
|
|
21055
21077
|
* Creates object a snapshot of editor: html and the current selection. Current selection calculate by
|
|
@@ -23296,17 +23318,26 @@ let ToolbarButton = class ToolbarButton extends jodit_core_ui_button__WEBPACK_IM
|
|
|
23296
23318
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.popup)) {
|
|
23297
23319
|
const popup = this.openPopup();
|
|
23298
23320
|
popup.parentElement = this;
|
|
23299
|
-
|
|
23300
|
-
|
|
23301
|
-
|
|
23302
|
-
|
|
23303
|
-
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23321
|
+
try {
|
|
23322
|
+
if (this.j.e.fire((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`before-${ctr.name}-open-popup`), this.target, ctr, popup) !== false) {
|
|
23323
|
+
const target = (_c = (_b = (_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.getTarget(this)) !== null && _b !== void 0 ? _b : this.target) !== null && _c !== void 0 ? _c : null;
|
|
23324
|
+
const elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
23325
|
+
if (elm) {
|
|
23326
|
+
popup
|
|
23327
|
+
.setContent((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(elm) ? this.j.c.fromHTML(elm) : elm)
|
|
23328
|
+
.open(() => (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.position)(this.container), false, this.j.o.allowTabNavigation
|
|
23329
|
+
? this.container
|
|
23330
|
+
: undefined);
|
|
23331
|
+
}
|
|
23332
|
+
else {
|
|
23333
|
+
this.__closePopup();
|
|
23334
|
+
}
|
|
23308
23335
|
}
|
|
23309
23336
|
}
|
|
23337
|
+
catch (e) {
|
|
23338
|
+
this.__closePopup();
|
|
23339
|
+
throw e;
|
|
23340
|
+
}
|
|
23310
23341
|
/**
|
|
23311
23342
|
* Fired after the popup was opened for some control button
|
|
23312
23343
|
*/
|
|
@@ -25705,6 +25736,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25705
25736
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
25706
25737
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
25707
25738
|
*/
|
|
25739
|
+
/**
|
|
25740
|
+
* @module plugins/ai-assistant
|
|
25741
|
+
*/
|
|
25708
25742
|
|
|
25709
25743
|
|
|
25710
25744
|
|
|
@@ -31697,7 +31731,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
|
|
|
31697
31731
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31698
31732
|
*/
|
|
31699
31733
|
|
|
31700
|
-
/**
|
|
31734
|
+
/**
|
|
31735
|
+
* @private
|
|
31736
|
+
*/
|
|
31701
31737
|
function readAlign(image, values) {
|
|
31702
31738
|
// Align
|
|
31703
31739
|
if (image.style.cssFloat &&
|
|
@@ -31818,6 +31854,9 @@ function readLink(state, j, values) {
|
|
|
31818
31854
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31819
31855
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31820
31856
|
*/
|
|
31857
|
+
/**
|
|
31858
|
+
* @module plugins/image-properties
|
|
31859
|
+
*/
|
|
31821
31860
|
|
|
31822
31861
|
/** @private */
|
|
31823
31862
|
function readMargins(image, values, state) {
|
|
@@ -31861,6 +31900,9 @@ function readMargins(image, values, state) {
|
|
|
31861
31900
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31862
31901
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31863
31902
|
*/
|
|
31903
|
+
/**
|
|
31904
|
+
* @module plugins/image-properties
|
|
31905
|
+
*/
|
|
31864
31906
|
|
|
31865
31907
|
|
|
31866
31908
|
|
|
@@ -32674,6 +32716,9 @@ function openImagePopup(j, dialog, state, button) {
|
|
|
32674
32716
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32675
32717
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32676
32718
|
*/
|
|
32719
|
+
/**
|
|
32720
|
+
* @module plugins/image-properties
|
|
32721
|
+
*/
|
|
32677
32722
|
|
|
32678
32723
|
|
|
32679
32724
|
/** @private */
|
|
@@ -32862,6 +32907,9 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32862
32907
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32863
32908
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32864
32909
|
*/
|
|
32910
|
+
/**
|
|
32911
|
+
* @module plugins/image-properties
|
|
32912
|
+
*/
|
|
32865
32913
|
|
|
32866
32914
|
|
|
32867
32915
|
|
|
@@ -34998,13 +35046,17 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34998
35046
|
}
|
|
34999
35047
|
}
|
|
35000
35048
|
onProcessPasteLink(ignore, html) {
|
|
35049
|
+
var _a, _b, _c, _d;
|
|
35001
35050
|
const { jodit } = this;
|
|
35002
35051
|
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
35003
35052
|
return;
|
|
35004
35053
|
}
|
|
35005
35054
|
jodit.e.stopPropagation('processPaste');
|
|
35006
35055
|
if (jodit.o.link.processVideoLink) {
|
|
35007
|
-
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.
|
|
35056
|
+
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.convertMediaUrlToVideoEmbed, html, {
|
|
35057
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
35058
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
35059
|
+
});
|
|
35008
35060
|
if (embed !== html) {
|
|
35009
35061
|
return jodit.createInside.fromHTML(embed);
|
|
35010
35062
|
}
|
|
@@ -41609,14 +41661,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.sym
|
|
|
41609
41661
|
editor.e.on(container, 'close_dialog', close);
|
|
41610
41662
|
return box;
|
|
41611
41663
|
}
|
|
41612
|
-
|
|
41613
|
-
|
|
41614
|
-
|
|
41615
|
-
|
|
41616
|
-
|
|
41617
|
-
a && a.focus();
|
|
41618
|
-
}
|
|
41664
|
+
editor
|
|
41665
|
+
.alert(container, 'Select Special Character', undefined, 'jodit-symbols')
|
|
41666
|
+
.bindDestruct(editor);
|
|
41667
|
+
const a = container.querySelector('a');
|
|
41668
|
+
a && a.focus();
|
|
41619
41669
|
}
|
|
41670
|
+
return;
|
|
41620
41671
|
}
|
|
41621
41672
|
};
|
|
41622
41673
|
|
|
@@ -42133,17 +42184,15 @@ module.exports = {
|
|
|
42133
42184
|
class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
|
|
42134
42185
|
constructor(jodit) {
|
|
42135
42186
|
super(jodit);
|
|
42136
|
-
/** @override */
|
|
42137
42187
|
this.buttons = [
|
|
42138
42188
|
{
|
|
42139
42189
|
name: 'symbols',
|
|
42140
42190
|
group: 'insert'
|
|
42141
42191
|
}
|
|
42142
42192
|
];
|
|
42143
|
-
this.
|
|
42193
|
+
this.__countInRow = 17;
|
|
42144
42194
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
42145
42195
|
}
|
|
42146
|
-
/** @override */
|
|
42147
42196
|
afterInit(jodit) {
|
|
42148
42197
|
jodit.e.on('generateSpecialCharactersTable.symbols', () => {
|
|
42149
42198
|
const container = jodit.c.fromHTML(`<div class="jodit-symbols__container">
|
|
@@ -42153,10 +42202,15 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42153
42202
|
<div class="jodit-symbols__container_preview">
|
|
42154
42203
|
<div class="jodit-symbols__preview"></div>
|
|
42155
42204
|
</div>
|
|
42156
|
-
</div>`)
|
|
42205
|
+
</div>`);
|
|
42206
|
+
const preview = container.querySelector('.jodit-symbols__preview');
|
|
42207
|
+
const table = container.querySelector('table');
|
|
42208
|
+
const body = table.tBodies[0];
|
|
42209
|
+
const chars = [];
|
|
42157
42210
|
for (let i = 0; i < jodit.o.specialCharacters.length;) {
|
|
42158
42211
|
const tr = jodit.c.element('tr');
|
|
42159
|
-
for (let j = 0; j < this.
|
|
42212
|
+
for (let j = 0; j < this.__countInRow &&
|
|
42213
|
+
i < jodit.o.specialCharacters.length; j += 1, i += 1) {
|
|
42160
42214
|
const td = jodit.c.element('td'), a = jodit.c.fromHTML(`<a
|
|
42161
42215
|
data-index="${i}"
|
|
42162
42216
|
data-index-j="${j}"
|
|
@@ -42178,7 +42232,9 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42178
42232
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
|
|
42179
42233
|
jodit.s.focus();
|
|
42180
42234
|
jodit.s.insertHTML(this.innerHTML);
|
|
42181
|
-
|
|
42235
|
+
if (!(e === null || e === void 0 ? void 0 : e.shiftKey)) {
|
|
42236
|
+
jodit.e.fire(this, 'close_dialog');
|
|
42237
|
+
}
|
|
42182
42238
|
e && e.preventDefault();
|
|
42183
42239
|
e && e.stopImmediatePropagation();
|
|
42184
42240
|
}
|
|
@@ -42198,18 +42254,18 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42198
42254
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN:
|
|
42199
42255
|
newIndex =
|
|
42200
42256
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42201
|
-
? index - self.
|
|
42202
|
-
: index + self.
|
|
42257
|
+
? index - self.__countInRow
|
|
42258
|
+
: index + self.__countInRow;
|
|
42203
42259
|
if (chars[newIndex] === undefined) {
|
|
42204
42260
|
newIndex =
|
|
42205
42261
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42206
42262
|
? Math.floor(chars.length /
|
|
42207
|
-
self.
|
|
42208
|
-
self.
|
|
42263
|
+
self.__countInRow) *
|
|
42264
|
+
self.__countInRow +
|
|
42209
42265
|
jIndex
|
|
42210
42266
|
: jIndex;
|
|
42211
42267
|
if (newIndex > chars.length - 1) {
|
|
42212
|
-
newIndex -= self.
|
|
42268
|
+
newIndex -= self.__countInRow;
|
|
42213
42269
|
}
|
|
42214
42270
|
}
|
|
42215
42271
|
chars[newIndex] && chars[newIndex].focus();
|
|
@@ -42824,12 +42880,17 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('table
|
|
|
42824
42880
|
|
|
42825
42881
|
|
|
42826
42882
|
|
|
42883
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.video = {
|
|
42884
|
+
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
42885
|
+
defaultWidth: 400,
|
|
42886
|
+
defaultHeight: 345
|
|
42887
|
+
};
|
|
42827
42888
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
42828
42889
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video = {
|
|
42829
|
-
popup: (
|
|
42830
|
-
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42831
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42832
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(
|
|
42890
|
+
popup: (jodit, current, close) => {
|
|
42891
|
+
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42892
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42893
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(jodit, {
|
|
42833
42894
|
name: 'url',
|
|
42834
42895
|
required: true,
|
|
42835
42896
|
label: 'URL',
|
|
@@ -42837,26 +42898,26 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42837
42898
|
validators: ['url']
|
|
42838
42899
|
})
|
|
42839
42900
|
]),
|
|
42840
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42841
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42901
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42902
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formLink.submit())
|
|
42842
42903
|
])
|
|
42843
|
-
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42844
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42845
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(
|
|
42904
|
+
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42905
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42906
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(jodit, {
|
|
42846
42907
|
name: 'code',
|
|
42847
42908
|
required: true,
|
|
42848
42909
|
label: 'Embed code'
|
|
42849
42910
|
})
|
|
42850
42911
|
]),
|
|
42851
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42852
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42912
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42913
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formCode.submit())
|
|
42853
42914
|
])
|
|
42854
42915
|
]), tabs = [], insertCode = (code) => {
|
|
42855
|
-
|
|
42856
|
-
|
|
42916
|
+
jodit.s.restore();
|
|
42917
|
+
jodit.s.insertHTML(code);
|
|
42857
42918
|
close();
|
|
42858
42919
|
};
|
|
42859
|
-
|
|
42920
|
+
jodit.s.save();
|
|
42860
42921
|
tabs.push({
|
|
42861
42922
|
icon: 'link',
|
|
42862
42923
|
name: 'Link',
|
|
@@ -42867,12 +42928,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42867
42928
|
content: formCode.container
|
|
42868
42929
|
});
|
|
42869
42930
|
formLink.onSubmit(data => {
|
|
42870
|
-
|
|
42931
|
+
var _a, _b, _c, _d;
|
|
42932
|
+
insertCode((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed, data.url, {
|
|
42933
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
42934
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
42935
|
+
}));
|
|
42871
42936
|
});
|
|
42872
42937
|
formCode.onSubmit(data => {
|
|
42873
42938
|
insertCode(data.code);
|
|
42874
42939
|
});
|
|
42875
|
-
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(
|
|
42940
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(jodit, tabs);
|
|
42876
42941
|
},
|
|
42877
42942
|
tags: ['iframe'],
|
|
42878
42943
|
tooltip: 'Insert youtube/vimeo video'
|