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/es2015/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 = "es2015";
|
|
1741
1741
|
const IS_ES_MODERN = true;
|
|
@@ -7552,10 +7552,10 @@ const buildQuery = (data, prefix) => {
|
|
|
7552
7552
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
7553
7553
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
7554
7554
|
*/
|
|
7555
|
-
|
|
7556
7555
|
/**
|
|
7557
7556
|
* @module helpers/utils
|
|
7558
7557
|
*/
|
|
7558
|
+
|
|
7559
7559
|
const completeUrl = (url) => {
|
|
7560
7560
|
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
|
|
7561
7561
|
url = 'https:' + url;
|
|
@@ -7691,11 +7691,12 @@ function ConfigFlatten(obj) {
|
|
|
7691
7691
|
/**
|
|
7692
7692
|
* Javascript url pattern converter replace youtube/vimeo url in embed code.
|
|
7693
7693
|
*/
|
|
7694
|
-
const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
7694
|
+
const convertMediaUrlToVideoEmbed = (url, { width = 400, height = 345 } = {}) => {
|
|
7695
7695
|
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
|
|
7696
7696
|
return url;
|
|
7697
7697
|
}
|
|
7698
|
-
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a')
|
|
7698
|
+
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
|
|
7699
|
+
const pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
|
|
7699
7700
|
parser.href = url;
|
|
7700
7701
|
if (!width) {
|
|
7701
7702
|
width = 400;
|
|
@@ -7722,7 +7723,10 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
|
7722
7723
|
case 'www.youtu.be': {
|
|
7723
7724
|
const query = parser.search
|
|
7724
7725
|
? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
|
|
7725
|
-
: { v: parser.pathname.
|
|
7726
|
+
: { v: parser.pathname.substring(1) };
|
|
7727
|
+
if (/^embed\/.*/.test(query.v)) {
|
|
7728
|
+
query.v = query.v.substring(6);
|
|
7729
|
+
}
|
|
7726
7730
|
return query.v
|
|
7727
7731
|
? '<iframe width="' +
|
|
7728
7732
|
width +
|
|
@@ -11292,6 +11296,7 @@ function extractSelectedPart(wrapper, font, jodit) {
|
|
|
11292
11296
|
}
|
|
11293
11297
|
/**
|
|
11294
11298
|
* Retrieves content before after the selected area, clears it if it is empty, and inserts before after the framed selection
|
|
11299
|
+
* @private
|
|
11295
11300
|
*/
|
|
11296
11301
|
function extractAndMove(wrapper, range, left) {
|
|
11297
11302
|
const fragment = range.extractContents();
|
|
@@ -16341,7 +16346,17 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16341
16346
|
: jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.defaultOptions.defaultTimeout;
|
|
16342
16347
|
}
|
|
16343
16348
|
/**
|
|
16344
|
-
* Method wrap usual
|
|
16349
|
+
* Method wrap usual object in Object helper for prevent deep object merging in options*
|
|
16350
|
+
* ```js
|
|
16351
|
+
* const editor = Jodit.make('#editor', {
|
|
16352
|
+
* controls: {
|
|
16353
|
+
* fontsize: {
|
|
16354
|
+
* list: Jodit.atom([8, 9, 10])
|
|
16355
|
+
* }
|
|
16356
|
+
* }
|
|
16357
|
+
* });
|
|
16358
|
+
* ```
|
|
16359
|
+
* In this case, the array [8, 9, 10] will not be combined with other arrays, but will replace them
|
|
16345
16360
|
*/
|
|
16346
16361
|
static atom(object) {
|
|
16347
16362
|
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markAsAtomic)(object);
|
|
@@ -20895,6 +20910,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20895
20910
|
constructor() {
|
|
20896
20911
|
super(...arguments);
|
|
20897
20912
|
this.__isBlocked = false;
|
|
20913
|
+
this.__levelOfTransaction = 0;
|
|
20898
20914
|
}
|
|
20899
20915
|
/** @override */
|
|
20900
20916
|
className() {
|
|
@@ -20975,6 +20991,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20975
20991
|
}
|
|
20976
20992
|
transaction(changes) {
|
|
20977
20993
|
this.__block(true);
|
|
20994
|
+
this.__levelOfTransaction += 1;
|
|
20978
20995
|
try {
|
|
20979
20996
|
changes();
|
|
20980
20997
|
}
|
|
@@ -20983,7 +21000,12 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20983
21000
|
throw e;
|
|
20984
21001
|
}
|
|
20985
21002
|
}
|
|
20986
|
-
|
|
21003
|
+
finally {
|
|
21004
|
+
this.__levelOfTransaction -= 1;
|
|
21005
|
+
if (this.__levelOfTransaction === 0) {
|
|
21006
|
+
this.__block(false);
|
|
21007
|
+
}
|
|
21008
|
+
}
|
|
20987
21009
|
}
|
|
20988
21010
|
/**
|
|
20989
21011
|
* Creates object a snapshot of editor: html and the current selection. Current selection calculate by
|
|
@@ -23225,17 +23247,26 @@ let ToolbarButton = class ToolbarButton extends jodit_core_ui_button__WEBPACK_IM
|
|
|
23225
23247
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.popup)) {
|
|
23226
23248
|
const popup = this.openPopup();
|
|
23227
23249
|
popup.parentElement = this;
|
|
23228
|
-
|
|
23229
|
-
|
|
23230
|
-
|
|
23231
|
-
|
|
23232
|
-
|
|
23233
|
-
|
|
23234
|
-
|
|
23235
|
-
|
|
23236
|
-
|
|
23250
|
+
try {
|
|
23251
|
+
if (this.j.e.fire((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`before-${ctr.name}-open-popup`), this.target, ctr, popup) !== false) {
|
|
23252
|
+
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;
|
|
23253
|
+
const elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
23254
|
+
if (elm) {
|
|
23255
|
+
popup
|
|
23256
|
+
.setContent((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(elm) ? this.j.c.fromHTML(elm) : elm)
|
|
23257
|
+
.open(() => (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.position)(this.container), false, this.j.o.allowTabNavigation
|
|
23258
|
+
? this.container
|
|
23259
|
+
: undefined);
|
|
23260
|
+
}
|
|
23261
|
+
else {
|
|
23262
|
+
this.__closePopup();
|
|
23263
|
+
}
|
|
23237
23264
|
}
|
|
23238
23265
|
}
|
|
23266
|
+
catch (e) {
|
|
23267
|
+
this.__closePopup();
|
|
23268
|
+
throw e;
|
|
23269
|
+
}
|
|
23239
23270
|
/**
|
|
23240
23271
|
* Fired after the popup was opened for some control button
|
|
23241
23272
|
*/
|
|
@@ -25624,6 +25655,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25624
25655
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
25625
25656
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
25626
25657
|
*/
|
|
25658
|
+
/**
|
|
25659
|
+
* @module plugins/ai-assistant
|
|
25660
|
+
*/
|
|
25627
25661
|
|
|
25628
25662
|
|
|
25629
25663
|
|
|
@@ -31610,7 +31644,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
|
|
|
31610
31644
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31611
31645
|
*/
|
|
31612
31646
|
|
|
31613
|
-
/**
|
|
31647
|
+
/**
|
|
31648
|
+
* @private
|
|
31649
|
+
*/
|
|
31614
31650
|
function readAlign(image, values) {
|
|
31615
31651
|
// Align
|
|
31616
31652
|
if (image.style.cssFloat &&
|
|
@@ -31735,6 +31771,9 @@ function readLink(state, j, values) {
|
|
|
31735
31771
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31736
31772
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31737
31773
|
*/
|
|
31774
|
+
/**
|
|
31775
|
+
* @module plugins/image-properties
|
|
31776
|
+
*/
|
|
31738
31777
|
|
|
31739
31778
|
/** @private */
|
|
31740
31779
|
function readMargins(image, values, state) {
|
|
@@ -31780,6 +31819,9 @@ function readMargins(image, values, state) {
|
|
|
31780
31819
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31781
31820
|
*/
|
|
31782
31821
|
|
|
31822
|
+
/**
|
|
31823
|
+
* @module plugins/image-properties
|
|
31824
|
+
*/
|
|
31783
31825
|
|
|
31784
31826
|
|
|
31785
31827
|
|
|
@@ -32599,6 +32641,9 @@ function openImagePopup(j, dialog, state, button) {
|
|
|
32599
32641
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32600
32642
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32601
32643
|
*/
|
|
32644
|
+
/**
|
|
32645
|
+
* @module plugins/image-properties
|
|
32646
|
+
*/
|
|
32602
32647
|
|
|
32603
32648
|
|
|
32604
32649
|
/** @private */
|
|
@@ -32787,6 +32832,9 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32787
32832
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32788
32833
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32789
32834
|
*/
|
|
32835
|
+
/**
|
|
32836
|
+
* @module plugins/image-properties
|
|
32837
|
+
*/
|
|
32790
32838
|
|
|
32791
32839
|
|
|
32792
32840
|
|
|
@@ -34925,13 +34973,17 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
|
|
|
34925
34973
|
}
|
|
34926
34974
|
}
|
|
34927
34975
|
onProcessPasteLink(ignore, html) {
|
|
34976
|
+
var _a, _b, _c, _d;
|
|
34928
34977
|
const { jodit } = this;
|
|
34929
34978
|
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
34930
34979
|
return;
|
|
34931
34980
|
}
|
|
34932
34981
|
jodit.e.stopPropagation('processPaste');
|
|
34933
34982
|
if (jodit.o.link.processVideoLink) {
|
|
34934
|
-
const embed = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.
|
|
34983
|
+
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, {
|
|
34984
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
34985
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
34986
|
+
});
|
|
34935
34987
|
if (embed !== html) {
|
|
34936
34988
|
return jodit.createInside.fromHTML(embed);
|
|
34937
34989
|
}
|
|
@@ -41554,14 +41606,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.sym
|
|
|
41554
41606
|
editor.e.on(container, 'close_dialog', close);
|
|
41555
41607
|
return box;
|
|
41556
41608
|
}
|
|
41557
|
-
|
|
41558
|
-
|
|
41559
|
-
|
|
41560
|
-
|
|
41561
|
-
|
|
41562
|
-
a && a.focus();
|
|
41563
|
-
}
|
|
41609
|
+
editor
|
|
41610
|
+
.alert(container, 'Select Special Character', undefined, 'jodit-symbols')
|
|
41611
|
+
.bindDestruct(editor);
|
|
41612
|
+
const a = container.querySelector('a');
|
|
41613
|
+
a && a.focus();
|
|
41564
41614
|
}
|
|
41615
|
+
return;
|
|
41565
41616
|
}
|
|
41566
41617
|
};
|
|
41567
41618
|
|
|
@@ -42078,17 +42129,15 @@ module.exports = {
|
|
|
42078
42129
|
class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
|
|
42079
42130
|
constructor(jodit) {
|
|
42080
42131
|
super(jodit);
|
|
42081
|
-
/** @override */
|
|
42082
42132
|
this.buttons = [
|
|
42083
42133
|
{
|
|
42084
42134
|
name: 'symbols',
|
|
42085
42135
|
group: 'insert'
|
|
42086
42136
|
}
|
|
42087
42137
|
];
|
|
42088
|
-
this.
|
|
42138
|
+
this.__countInRow = 17;
|
|
42089
42139
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
42090
42140
|
}
|
|
42091
|
-
/** @override */
|
|
42092
42141
|
afterInit(jodit) {
|
|
42093
42142
|
jodit.e.on('generateSpecialCharactersTable.symbols', () => {
|
|
42094
42143
|
const container = jodit.c.fromHTML(`<div class="jodit-symbols__container">
|
|
@@ -42098,10 +42147,15 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42098
42147
|
<div class="jodit-symbols__container_preview">
|
|
42099
42148
|
<div class="jodit-symbols__preview"></div>
|
|
42100
42149
|
</div>
|
|
42101
|
-
</div>`)
|
|
42150
|
+
</div>`);
|
|
42151
|
+
const preview = container.querySelector('.jodit-symbols__preview');
|
|
42152
|
+
const table = container.querySelector('table');
|
|
42153
|
+
const body = table.tBodies[0];
|
|
42154
|
+
const chars = [];
|
|
42102
42155
|
for (let i = 0; i < jodit.o.specialCharacters.length;) {
|
|
42103
42156
|
const tr = jodit.c.element('tr');
|
|
42104
|
-
for (let j = 0; j < this.
|
|
42157
|
+
for (let j = 0; j < this.__countInRow &&
|
|
42158
|
+
i < jodit.o.specialCharacters.length; j += 1, i += 1) {
|
|
42105
42159
|
const td = jodit.c.element('td'), a = jodit.c.fromHTML(`<a
|
|
42106
42160
|
data-index="${i}"
|
|
42107
42161
|
data-index-j="${j}"
|
|
@@ -42123,7 +42177,9 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42123
42177
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
|
|
42124
42178
|
jodit.s.focus();
|
|
42125
42179
|
jodit.s.insertHTML(this.innerHTML);
|
|
42126
|
-
|
|
42180
|
+
if (!(e === null || e === void 0 ? void 0 : e.shiftKey)) {
|
|
42181
|
+
jodit.e.fire(this, 'close_dialog');
|
|
42182
|
+
}
|
|
42127
42183
|
e && e.preventDefault();
|
|
42128
42184
|
e && e.stopImmediatePropagation();
|
|
42129
42185
|
}
|
|
@@ -42143,18 +42199,18 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42143
42199
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN:
|
|
42144
42200
|
newIndex =
|
|
42145
42201
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42146
|
-
? index - self.
|
|
42147
|
-
: index + self.
|
|
42202
|
+
? index - self.__countInRow
|
|
42203
|
+
: index + self.__countInRow;
|
|
42148
42204
|
if (chars[newIndex] === undefined) {
|
|
42149
42205
|
newIndex =
|
|
42150
42206
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42151
42207
|
? Math.floor(chars.length /
|
|
42152
|
-
self.
|
|
42153
|
-
self.
|
|
42208
|
+
self.__countInRow) *
|
|
42209
|
+
self.__countInRow +
|
|
42154
42210
|
jIndex
|
|
42155
42211
|
: jIndex;
|
|
42156
42212
|
if (newIndex > chars.length - 1) {
|
|
42157
|
-
newIndex -= self.
|
|
42213
|
+
newIndex -= self.__countInRow;
|
|
42158
42214
|
}
|
|
42159
42215
|
}
|
|
42160
42216
|
chars[newIndex] && chars[newIndex].focus();
|
|
@@ -42769,12 +42825,17 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('table
|
|
|
42769
42825
|
|
|
42770
42826
|
|
|
42771
42827
|
|
|
42828
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.video = {
|
|
42829
|
+
parseUrlToVideoEmbed: jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed,
|
|
42830
|
+
defaultWidth: 400,
|
|
42831
|
+
defaultHeight: 345
|
|
42832
|
+
};
|
|
42772
42833
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__/* .Icon */ .I.set('video', (_video_svg__WEBPACK_IMPORTED_MODULE_6___default()));
|
|
42773
42834
|
jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video = {
|
|
42774
|
-
popup: (
|
|
42775
|
-
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42776
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42777
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(
|
|
42835
|
+
popup: (jodit, current, close) => {
|
|
42836
|
+
const formLink = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42837
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42838
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIInput */ .tS(jodit, {
|
|
42778
42839
|
name: 'url',
|
|
42779
42840
|
required: true,
|
|
42780
42841
|
label: 'URL',
|
|
@@ -42782,26 +42843,26 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42782
42843
|
validators: ['url']
|
|
42783
42844
|
})
|
|
42784
42845
|
]),
|
|
42785
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42786
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42846
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42847
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formLink.submit())
|
|
42787
42848
|
])
|
|
42788
|
-
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(
|
|
42789
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42790
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(
|
|
42849
|
+
]), formCode = new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIForm */ .XV(jodit, [
|
|
42850
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42851
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UITextArea */ .F0(jodit, {
|
|
42791
42852
|
name: 'code',
|
|
42792
42853
|
required: true,
|
|
42793
42854
|
label: 'Embed code'
|
|
42794
42855
|
})
|
|
42795
42856
|
]),
|
|
42796
|
-
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(
|
|
42797
|
-
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(
|
|
42857
|
+
new jodit_core_ui_form__WEBPACK_IMPORTED_MODULE_2__/* .UIBlock */ .Yh(jodit, [
|
|
42858
|
+
(0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .$n)(jodit, '', 'Insert', 'primary').onAction(() => formCode.submit())
|
|
42798
42859
|
])
|
|
42799
42860
|
]), tabs = [], insertCode = (code) => {
|
|
42800
|
-
|
|
42801
|
-
|
|
42861
|
+
jodit.s.restore();
|
|
42862
|
+
jodit.s.insertHTML(code);
|
|
42802
42863
|
close();
|
|
42803
42864
|
};
|
|
42804
|
-
|
|
42865
|
+
jodit.s.save();
|
|
42805
42866
|
tabs.push({
|
|
42806
42867
|
icon: 'link',
|
|
42807
42868
|
name: 'Link',
|
|
@@ -42812,12 +42873,16 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.vid
|
|
|
42812
42873
|
content: formCode.container
|
|
42813
42874
|
});
|
|
42814
42875
|
formLink.onSubmit(data => {
|
|
42815
|
-
|
|
42876
|
+
var _a, _b, _c, _d;
|
|
42877
|
+
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, {
|
|
42878
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
42879
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
42880
|
+
}));
|
|
42816
42881
|
});
|
|
42817
42882
|
formCode.onSubmit(data => {
|
|
42818
42883
|
insertCode(data.code);
|
|
42819
42884
|
});
|
|
42820
|
-
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(
|
|
42885
|
+
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_5__/* .TabsWidget */ .Zg)(jodit, tabs);
|
|
42821
42886
|
},
|
|
42822
42887
|
tags: ['iframe'],
|
|
42823
42888
|
tooltip: 'Insert youtube/vimeo video'
|