jodit 4.2.41 → 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 +19 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +81 -33
- 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 +81 -33
- 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 +81 -33
- 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 +81 -33
- 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 +81 -33
- 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/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/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/symbols/config.js +6 -7
- package/esm/plugins/symbols/symbols.d.ts +1 -3
- package/esm/plugins/symbols/symbols.js +16 -11
- 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/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/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/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;
|
|
@@ -11284,6 +11284,7 @@ function extractSelectedPart(wrapper, font, jodit) {
|
|
|
11284
11284
|
}
|
|
11285
11285
|
/**
|
|
11286
11286
|
* Retrieves content before after the selected area, clears it if it is empty, and inserts before after the framed selection
|
|
11287
|
+
* @private
|
|
11287
11288
|
*/
|
|
11288
11289
|
function extractAndMove(wrapper, range, left) {
|
|
11289
11290
|
const fragment = range.extractContents();
|
|
@@ -16400,7 +16401,17 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16400
16401
|
: jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.defaultOptions.defaultTimeout;
|
|
16401
16402
|
}
|
|
16402
16403
|
/**
|
|
16403
|
-
* 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
|
|
16404
16415
|
*/
|
|
16405
16416
|
static atom(object) {
|
|
16406
16417
|
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markAsAtomic)(object);
|
|
@@ -20965,6 +20976,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20965
20976
|
constructor() {
|
|
20966
20977
|
super(...arguments);
|
|
20967
20978
|
this.__isBlocked = false;
|
|
20979
|
+
this.__levelOfTransaction = 0;
|
|
20968
20980
|
}
|
|
20969
20981
|
/** @override */
|
|
20970
20982
|
className() {
|
|
@@ -21045,6 +21057,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
21045
21057
|
}
|
|
21046
21058
|
transaction(changes) {
|
|
21047
21059
|
this.__block(true);
|
|
21060
|
+
this.__levelOfTransaction += 1;
|
|
21048
21061
|
try {
|
|
21049
21062
|
changes();
|
|
21050
21063
|
}
|
|
@@ -21053,7 +21066,12 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
21053
21066
|
throw e;
|
|
21054
21067
|
}
|
|
21055
21068
|
}
|
|
21056
|
-
|
|
21069
|
+
finally {
|
|
21070
|
+
this.__levelOfTransaction -= 1;
|
|
21071
|
+
if (this.__levelOfTransaction === 0) {
|
|
21072
|
+
this.__block(false);
|
|
21073
|
+
}
|
|
21074
|
+
}
|
|
21057
21075
|
}
|
|
21058
21076
|
/**
|
|
21059
21077
|
* Creates object a snapshot of editor: html and the current selection. Current selection calculate by
|
|
@@ -23300,17 +23318,26 @@ let ToolbarButton = class ToolbarButton extends jodit_core_ui_button__WEBPACK_IM
|
|
|
23300
23318
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.popup)) {
|
|
23301
23319
|
const popup = this.openPopup();
|
|
23302
23320
|
popup.parentElement = this;
|
|
23303
|
-
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23309
|
-
|
|
23310
|
-
|
|
23311
|
-
|
|
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
|
+
}
|
|
23312
23335
|
}
|
|
23313
23336
|
}
|
|
23337
|
+
catch (e) {
|
|
23338
|
+
this.__closePopup();
|
|
23339
|
+
throw e;
|
|
23340
|
+
}
|
|
23314
23341
|
/**
|
|
23315
23342
|
* Fired after the popup was opened for some control button
|
|
23316
23343
|
*/
|
|
@@ -25709,6 +25736,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25709
25736
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
25710
25737
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
25711
25738
|
*/
|
|
25739
|
+
/**
|
|
25740
|
+
* @module plugins/ai-assistant
|
|
25741
|
+
*/
|
|
25712
25742
|
|
|
25713
25743
|
|
|
25714
25744
|
|
|
@@ -31701,7 +31731,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
|
|
|
31701
31731
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31702
31732
|
*/
|
|
31703
31733
|
|
|
31704
|
-
/**
|
|
31734
|
+
/**
|
|
31735
|
+
* @private
|
|
31736
|
+
*/
|
|
31705
31737
|
function readAlign(image, values) {
|
|
31706
31738
|
// Align
|
|
31707
31739
|
if (image.style.cssFloat &&
|
|
@@ -31822,6 +31854,9 @@ function readLink(state, j, values) {
|
|
|
31822
31854
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31823
31855
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31824
31856
|
*/
|
|
31857
|
+
/**
|
|
31858
|
+
* @module plugins/image-properties
|
|
31859
|
+
*/
|
|
31825
31860
|
|
|
31826
31861
|
/** @private */
|
|
31827
31862
|
function readMargins(image, values, state) {
|
|
@@ -31865,6 +31900,9 @@ function readMargins(image, values, state) {
|
|
|
31865
31900
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31866
31901
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31867
31902
|
*/
|
|
31903
|
+
/**
|
|
31904
|
+
* @module plugins/image-properties
|
|
31905
|
+
*/
|
|
31868
31906
|
|
|
31869
31907
|
|
|
31870
31908
|
|
|
@@ -32678,6 +32716,9 @@ function openImagePopup(j, dialog, state, button) {
|
|
|
32678
32716
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32679
32717
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32680
32718
|
*/
|
|
32719
|
+
/**
|
|
32720
|
+
* @module plugins/image-properties
|
|
32721
|
+
*/
|
|
32681
32722
|
|
|
32682
32723
|
|
|
32683
32724
|
/** @private */
|
|
@@ -32866,6 +32907,9 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32866
32907
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32867
32908
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32868
32909
|
*/
|
|
32910
|
+
/**
|
|
32911
|
+
* @module plugins/image-properties
|
|
32912
|
+
*/
|
|
32869
32913
|
|
|
32870
32914
|
|
|
32871
32915
|
|
|
@@ -41617,14 +41661,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.sym
|
|
|
41617
41661
|
editor.e.on(container, 'close_dialog', close);
|
|
41618
41662
|
return box;
|
|
41619
41663
|
}
|
|
41620
|
-
|
|
41621
|
-
|
|
41622
|
-
|
|
41623
|
-
|
|
41624
|
-
|
|
41625
|
-
a && a.focus();
|
|
41626
|
-
}
|
|
41664
|
+
editor
|
|
41665
|
+
.alert(container, 'Select Special Character', undefined, 'jodit-symbols')
|
|
41666
|
+
.bindDestruct(editor);
|
|
41667
|
+
const a = container.querySelector('a');
|
|
41668
|
+
a && a.focus();
|
|
41627
41669
|
}
|
|
41670
|
+
return;
|
|
41628
41671
|
}
|
|
41629
41672
|
};
|
|
41630
41673
|
|
|
@@ -42141,17 +42184,15 @@ module.exports = {
|
|
|
42141
42184
|
class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
|
|
42142
42185
|
constructor(jodit) {
|
|
42143
42186
|
super(jodit);
|
|
42144
|
-
/** @override */
|
|
42145
42187
|
this.buttons = [
|
|
42146
42188
|
{
|
|
42147
42189
|
name: 'symbols',
|
|
42148
42190
|
group: 'insert'
|
|
42149
42191
|
}
|
|
42150
42192
|
];
|
|
42151
|
-
this.
|
|
42193
|
+
this.__countInRow = 17;
|
|
42152
42194
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
42153
42195
|
}
|
|
42154
|
-
/** @override */
|
|
42155
42196
|
afterInit(jodit) {
|
|
42156
42197
|
jodit.e.on('generateSpecialCharactersTable.symbols', () => {
|
|
42157
42198
|
const container = jodit.c.fromHTML(`<div class="jodit-symbols__container">
|
|
@@ -42161,10 +42202,15 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42161
42202
|
<div class="jodit-symbols__container_preview">
|
|
42162
42203
|
<div class="jodit-symbols__preview"></div>
|
|
42163
42204
|
</div>
|
|
42164
|
-
</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 = [];
|
|
42165
42210
|
for (let i = 0; i < jodit.o.specialCharacters.length;) {
|
|
42166
42211
|
const tr = jodit.c.element('tr');
|
|
42167
|
-
for (let j = 0; j < this.
|
|
42212
|
+
for (let j = 0; j < this.__countInRow &&
|
|
42213
|
+
i < jodit.o.specialCharacters.length; j += 1, i += 1) {
|
|
42168
42214
|
const td = jodit.c.element('td'), a = jodit.c.fromHTML(`<a
|
|
42169
42215
|
data-index="${i}"
|
|
42170
42216
|
data-index-j="${j}"
|
|
@@ -42186,7 +42232,9 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42186
42232
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
|
|
42187
42233
|
jodit.s.focus();
|
|
42188
42234
|
jodit.s.insertHTML(this.innerHTML);
|
|
42189
|
-
|
|
42235
|
+
if (!(e === null || e === void 0 ? void 0 : e.shiftKey)) {
|
|
42236
|
+
jodit.e.fire(this, 'close_dialog');
|
|
42237
|
+
}
|
|
42190
42238
|
e && e.preventDefault();
|
|
42191
42239
|
e && e.stopImmediatePropagation();
|
|
42192
42240
|
}
|
|
@@ -42206,18 +42254,18 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42206
42254
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN:
|
|
42207
42255
|
newIndex =
|
|
42208
42256
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42209
|
-
? index - self.
|
|
42210
|
-
: index + self.
|
|
42257
|
+
? index - self.__countInRow
|
|
42258
|
+
: index + self.__countInRow;
|
|
42211
42259
|
if (chars[newIndex] === undefined) {
|
|
42212
42260
|
newIndex =
|
|
42213
42261
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42214
42262
|
? Math.floor(chars.length /
|
|
42215
|
-
self.
|
|
42216
|
-
self.
|
|
42263
|
+
self.__countInRow) *
|
|
42264
|
+
self.__countInRow +
|
|
42217
42265
|
jIndex
|
|
42218
42266
|
: jIndex;
|
|
42219
42267
|
if (newIndex > chars.length - 1) {
|
|
42220
|
-
newIndex -= self.
|
|
42268
|
+
newIndex -= self.__countInRow;
|
|
42221
42269
|
}
|
|
42222
42270
|
}
|
|
42223
42271
|
chars[newIndex] && chars[newIndex].focus();
|