jodit 4.2.41 → 4.2.45
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 +65 -5
- package/es2015/jodit.css +5 -7
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +121 -45
- package/es2015/jodit.min.css +1 -1
- 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 +5 -7
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +121 -45
- package/es2018/jodit.min.css +1 -1
- 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 +5 -7
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +121 -45
- package/es2021/jodit.min.css +1 -1
- 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 +5 -7
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +121 -45
- package/es2021.en/jodit.min.css +1 -1
- 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 +35 -66
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +121 -45
- package/es5/jodit.min.css +3 -3
- 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/config-proto.d.ts +18 -0
- package/esm/core/helpers/utils/config-proto.js +25 -0
- package/esm/core/selection/style/api/extract.js +1 -0
- package/esm/jodit.d.ts +11 -1
- package/esm/jodit.js +14 -8
- 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/source/editor/engines/ace.js +4 -0
- package/esm/plugins/source/editor/engines/area.js +2 -1
- 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/core/helpers/utils/config-proto.d.ts +18 -0
- 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/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.45
|
|
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.45";
|
|
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;
|
|
@@ -7571,8 +7571,9 @@ const completeUrl = (url) => {
|
|
|
7571
7571
|
|
|
7572
7572
|
"use strict";
|
|
7573
7573
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7574
|
-
/* harmony export */
|
|
7575
|
-
/* harmony export */
|
|
7574
|
+
/* harmony export */ VL: function() { return /* binding */ ConfigFlatten; },
|
|
7575
|
+
/* harmony export */ pi: function() { return /* binding */ ConfigDeepFlatten; },
|
|
7576
|
+
/* harmony export */ tb: function() { return /* binding */ ConfigProto; }
|
|
7576
7577
|
/* harmony export */ });
|
|
7577
7578
|
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(37923);
|
|
7578
7579
|
/* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25376);
|
|
@@ -7663,6 +7664,31 @@ function ConfigFlatten(obj) {
|
|
|
7663
7664
|
return app;
|
|
7664
7665
|
}, {});
|
|
7665
7666
|
}
|
|
7667
|
+
/**
|
|
7668
|
+
* Returns a plain object from a prototype-based object.
|
|
7669
|
+
* ```typescript
|
|
7670
|
+
* const editor = Jodit.make('#editor', {
|
|
7671
|
+
* image: {
|
|
7672
|
+
* dialogWidth: 500
|
|
7673
|
+
* }
|
|
7674
|
+
* });
|
|
7675
|
+
*
|
|
7676
|
+
* console.log(editor.o.image.openOnDblClick) // true
|
|
7677
|
+
* // But you can't get all options in plain object
|
|
7678
|
+
* console.log(JSON.stringify(editor.o.image)); // {"dialogWidth":500}
|
|
7679
|
+
*
|
|
7680
|
+
* const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
|
|
7681
|
+
* console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
|
|
7682
|
+
* ```
|
|
7683
|
+
*/
|
|
7684
|
+
function ConfigDeepFlatten(obj) {
|
|
7685
|
+
return (0,_utils__WEBPACK_IMPORTED_MODULE_1__/* .keys */ .HP)(obj, false).reduce((app, key) => {
|
|
7686
|
+
app[key] = (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_4__/* .isPlainObject */ .Q)(obj[key])
|
|
7687
|
+
? ConfigDeepFlatten(obj[key])
|
|
7688
|
+
: obj[key];
|
|
7689
|
+
return app;
|
|
7690
|
+
}, {});
|
|
7691
|
+
}
|
|
7666
7692
|
|
|
7667
7693
|
|
|
7668
7694
|
/***/ }),
|
|
@@ -8294,8 +8320,9 @@ const humanSizeToBytes = (human) => {
|
|
|
8294
8320
|
__webpack_require__.r(__webpack_exports__);
|
|
8295
8321
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8296
8322
|
/* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.$$; },
|
|
8297
|
-
/* harmony export */
|
|
8298
|
-
/* harmony export */
|
|
8323
|
+
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.pi; },
|
|
8324
|
+
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.VL; },
|
|
8325
|
+
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.tb; },
|
|
8299
8326
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.Rc; },
|
|
8300
8327
|
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_25__.d; },
|
|
8301
8328
|
/* harmony export */ OptionsError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ZW; },
|
|
@@ -11296,6 +11323,7 @@ function extractSelectedPart(wrapper, font, jodit) {
|
|
|
11296
11323
|
}
|
|
11297
11324
|
/**
|
|
11298
11325
|
* Retrieves content before after the selected area, clears it if it is empty, and inserts before after the framed selection
|
|
11326
|
+
* @private
|
|
11299
11327
|
*/
|
|
11300
11328
|
function extractAndMove(wrapper, range, left) {
|
|
11301
11329
|
const fragment = range.extractContents();
|
|
@@ -16345,7 +16373,17 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16345
16373
|
: jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.defaultOptions.defaultTimeout;
|
|
16346
16374
|
}
|
|
16347
16375
|
/**
|
|
16348
|
-
* Method wrap usual
|
|
16376
|
+
* Method wrap usual object in Object helper for prevent deep object merging in options*
|
|
16377
|
+
* ```js
|
|
16378
|
+
* const editor = Jodit.make('#editor', {
|
|
16379
|
+
* controls: {
|
|
16380
|
+
* fontsize: {
|
|
16381
|
+
* list: Jodit.atom([8, 9, 10])
|
|
16382
|
+
* }
|
|
16383
|
+
* }
|
|
16384
|
+
* });
|
|
16385
|
+
* ```
|
|
16386
|
+
* In this case, the array [8, 9, 10] will not be combined with other arrays, but will replace them
|
|
16349
16387
|
*/
|
|
16350
16388
|
static atom(object) {
|
|
16351
16389
|
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markAsAtomic)(object);
|
|
@@ -17350,13 +17388,6 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17350
17388
|
})
|
|
17351
17389
|
.on('blur', () => (this.editorIsActive = false));
|
|
17352
17390
|
this.__prepareWYSIWYGEditor();
|
|
17353
|
-
// direction
|
|
17354
|
-
if (this.o.direction) {
|
|
17355
|
-
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17356
|
-
this.container.style.direction = direction;
|
|
17357
|
-
this.container.setAttribute('dir', direction);
|
|
17358
|
-
this.toolbar.setDirection(direction);
|
|
17359
|
-
}
|
|
17360
17391
|
if (this.o.triggerChangeEvent) {
|
|
17361
17392
|
this.e.on('change', this.async.debounce(() => {
|
|
17362
17393
|
this.e && this.e.fire(this.element, 'change');
|
|
@@ -17374,6 +17405,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17374
17405
|
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17375
17406
|
this.editor.style.direction = direction;
|
|
17376
17407
|
this.editor.setAttribute('dir', direction);
|
|
17408
|
+
this.container.style.direction = direction;
|
|
17409
|
+
this.container.setAttribute('dir', direction);
|
|
17410
|
+
this.toolbar.setDirection(direction);
|
|
17377
17411
|
}
|
|
17378
17412
|
// proxy events
|
|
17379
17413
|
this.e
|
|
@@ -20899,6 +20933,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20899
20933
|
constructor() {
|
|
20900
20934
|
super(...arguments);
|
|
20901
20935
|
this.__isBlocked = false;
|
|
20936
|
+
this.__levelOfTransaction = 0;
|
|
20902
20937
|
}
|
|
20903
20938
|
/** @override */
|
|
20904
20939
|
className() {
|
|
@@ -20979,6 +21014,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20979
21014
|
}
|
|
20980
21015
|
transaction(changes) {
|
|
20981
21016
|
this.__block(true);
|
|
21017
|
+
this.__levelOfTransaction += 1;
|
|
20982
21018
|
try {
|
|
20983
21019
|
changes();
|
|
20984
21020
|
}
|
|
@@ -20987,7 +21023,12 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20987
21023
|
throw e;
|
|
20988
21024
|
}
|
|
20989
21025
|
}
|
|
20990
|
-
|
|
21026
|
+
finally {
|
|
21027
|
+
this.__levelOfTransaction -= 1;
|
|
21028
|
+
if (this.__levelOfTransaction === 0) {
|
|
21029
|
+
this.__block(false);
|
|
21030
|
+
}
|
|
21031
|
+
}
|
|
20991
21032
|
}
|
|
20992
21033
|
/**
|
|
20993
21034
|
* Creates object a snapshot of editor: html and the current selection. Current selection calculate by
|
|
@@ -23229,17 +23270,26 @@ let ToolbarButton = class ToolbarButton extends jodit_core_ui_button__WEBPACK_IM
|
|
|
23229
23270
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.popup)) {
|
|
23230
23271
|
const popup = this.openPopup();
|
|
23231
23272
|
popup.parentElement = this;
|
|
23232
|
-
|
|
23233
|
-
|
|
23234
|
-
|
|
23235
|
-
|
|
23236
|
-
|
|
23237
|
-
|
|
23238
|
-
|
|
23239
|
-
|
|
23240
|
-
|
|
23273
|
+
try {
|
|
23274
|
+
if (this.j.e.fire((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`before-${ctr.name}-open-popup`), this.target, ctr, popup) !== false) {
|
|
23275
|
+
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;
|
|
23276
|
+
const elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
23277
|
+
if (elm) {
|
|
23278
|
+
popup
|
|
23279
|
+
.setContent((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(elm) ? this.j.c.fromHTML(elm) : elm)
|
|
23280
|
+
.open(() => (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.position)(this.container), false, this.j.o.allowTabNavigation
|
|
23281
|
+
? this.container
|
|
23282
|
+
: undefined);
|
|
23283
|
+
}
|
|
23284
|
+
else {
|
|
23285
|
+
this.__closePopup();
|
|
23286
|
+
}
|
|
23241
23287
|
}
|
|
23242
23288
|
}
|
|
23289
|
+
catch (e) {
|
|
23290
|
+
this.__closePopup();
|
|
23291
|
+
throw e;
|
|
23292
|
+
}
|
|
23243
23293
|
/**
|
|
23244
23294
|
* Fired after the popup was opened for some control button
|
|
23245
23295
|
*/
|
|
@@ -25628,6 +25678,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25628
25678
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
25629
25679
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
25630
25680
|
*/
|
|
25681
|
+
/**
|
|
25682
|
+
* @module plugins/ai-assistant
|
|
25683
|
+
*/
|
|
25631
25684
|
|
|
25632
25685
|
|
|
25633
25686
|
|
|
@@ -31614,7 +31667,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
|
|
|
31614
31667
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31615
31668
|
*/
|
|
31616
31669
|
|
|
31617
|
-
/**
|
|
31670
|
+
/**
|
|
31671
|
+
* @private
|
|
31672
|
+
*/
|
|
31618
31673
|
function readAlign(image, values) {
|
|
31619
31674
|
// Align
|
|
31620
31675
|
if (image.style.cssFloat &&
|
|
@@ -31739,6 +31794,9 @@ function readLink(state, j, values) {
|
|
|
31739
31794
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31740
31795
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31741
31796
|
*/
|
|
31797
|
+
/**
|
|
31798
|
+
* @module plugins/image-properties
|
|
31799
|
+
*/
|
|
31742
31800
|
|
|
31743
31801
|
/** @private */
|
|
31744
31802
|
function readMargins(image, values, state) {
|
|
@@ -31784,6 +31842,9 @@ function readMargins(image, values, state) {
|
|
|
31784
31842
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31785
31843
|
*/
|
|
31786
31844
|
|
|
31845
|
+
/**
|
|
31846
|
+
* @module plugins/image-properties
|
|
31847
|
+
*/
|
|
31787
31848
|
|
|
31788
31849
|
|
|
31789
31850
|
|
|
@@ -32603,6 +32664,9 @@ function openImagePopup(j, dialog, state, button) {
|
|
|
32603
32664
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32604
32665
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32605
32666
|
*/
|
|
32667
|
+
/**
|
|
32668
|
+
* @module plugins/image-properties
|
|
32669
|
+
*/
|
|
32606
32670
|
|
|
32607
32671
|
|
|
32608
32672
|
/** @private */
|
|
@@ -32791,6 +32855,9 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32791
32855
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32792
32856
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32793
32857
|
*/
|
|
32858
|
+
/**
|
|
32859
|
+
* @module plugins/image-properties
|
|
32860
|
+
*/
|
|
32794
32861
|
|
|
32795
32862
|
|
|
32796
32863
|
|
|
@@ -39792,6 +39859,10 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
39792
39859
|
this.container.appendChild(fakeMirror);
|
|
39793
39860
|
const ace = editor.ow.ace;
|
|
39794
39861
|
this.instance = ace.edit(fakeMirror);
|
|
39862
|
+
if (editor.o.direction === 'rtl') {
|
|
39863
|
+
this.instance.setOption('rtlText', true);
|
|
39864
|
+
this.instance.setOption('rtl', true);
|
|
39865
|
+
}
|
|
39795
39866
|
this.instance.setTheme(editor.o.sourceEditorNativeOptions.theme);
|
|
39796
39867
|
this.instance.renderer.setShowGutter(editor.o.sourceEditorNativeOptions.showGutter);
|
|
39797
39868
|
this.instance
|
|
@@ -39955,7 +40026,8 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
|
|
|
39955
40026
|
}
|
|
39956
40027
|
init(editor) {
|
|
39957
40028
|
this.instance = editor.c.element('textarea', {
|
|
39958
|
-
class: 'jodit-source__mirror'
|
|
40029
|
+
class: 'jodit-source__mirror',
|
|
40030
|
+
dir: editor.o.direction === 'rtl' ? 'rtl' : undefined
|
|
39959
40031
|
});
|
|
39960
40032
|
this.container.appendChild(this.instance);
|
|
39961
40033
|
editor.e
|
|
@@ -41562,14 +41634,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.sym
|
|
|
41562
41634
|
editor.e.on(container, 'close_dialog', close);
|
|
41563
41635
|
return box;
|
|
41564
41636
|
}
|
|
41565
|
-
|
|
41566
|
-
|
|
41567
|
-
|
|
41568
|
-
|
|
41569
|
-
|
|
41570
|
-
a && a.focus();
|
|
41571
|
-
}
|
|
41637
|
+
editor
|
|
41638
|
+
.alert(container, 'Select Special Character', undefined, 'jodit-symbols')
|
|
41639
|
+
.bindDestruct(editor);
|
|
41640
|
+
const a = container.querySelector('a');
|
|
41641
|
+
a && a.focus();
|
|
41572
41642
|
}
|
|
41643
|
+
return;
|
|
41573
41644
|
}
|
|
41574
41645
|
};
|
|
41575
41646
|
|
|
@@ -42086,17 +42157,15 @@ module.exports = {
|
|
|
42086
42157
|
class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
|
|
42087
42158
|
constructor(jodit) {
|
|
42088
42159
|
super(jodit);
|
|
42089
|
-
/** @override */
|
|
42090
42160
|
this.buttons = [
|
|
42091
42161
|
{
|
|
42092
42162
|
name: 'symbols',
|
|
42093
42163
|
group: 'insert'
|
|
42094
42164
|
}
|
|
42095
42165
|
];
|
|
42096
|
-
this.
|
|
42166
|
+
this.__countInRow = 17;
|
|
42097
42167
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
42098
42168
|
}
|
|
42099
|
-
/** @override */
|
|
42100
42169
|
afterInit(jodit) {
|
|
42101
42170
|
jodit.e.on('generateSpecialCharactersTable.symbols', () => {
|
|
42102
42171
|
const container = jodit.c.fromHTML(`<div class="jodit-symbols__container">
|
|
@@ -42106,10 +42175,15 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42106
42175
|
<div class="jodit-symbols__container_preview">
|
|
42107
42176
|
<div class="jodit-symbols__preview"></div>
|
|
42108
42177
|
</div>
|
|
42109
|
-
</div>`)
|
|
42178
|
+
</div>`);
|
|
42179
|
+
const preview = container.querySelector('.jodit-symbols__preview');
|
|
42180
|
+
const table = container.querySelector('table');
|
|
42181
|
+
const body = table.tBodies[0];
|
|
42182
|
+
const chars = [];
|
|
42110
42183
|
for (let i = 0; i < jodit.o.specialCharacters.length;) {
|
|
42111
42184
|
const tr = jodit.c.element('tr');
|
|
42112
|
-
for (let j = 0; j < this.
|
|
42185
|
+
for (let j = 0; j < this.__countInRow &&
|
|
42186
|
+
i < jodit.o.specialCharacters.length; j += 1, i += 1) {
|
|
42113
42187
|
const td = jodit.c.element('td'), a = jodit.c.fromHTML(`<a
|
|
42114
42188
|
data-index="${i}"
|
|
42115
42189
|
data-index-j="${j}"
|
|
@@ -42131,7 +42205,9 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42131
42205
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
|
|
42132
42206
|
jodit.s.focus();
|
|
42133
42207
|
jodit.s.insertHTML(this.innerHTML);
|
|
42134
|
-
|
|
42208
|
+
if (!(e === null || e === void 0 ? void 0 : e.shiftKey)) {
|
|
42209
|
+
jodit.e.fire(this, 'close_dialog');
|
|
42210
|
+
}
|
|
42135
42211
|
e && e.preventDefault();
|
|
42136
42212
|
e && e.stopImmediatePropagation();
|
|
42137
42213
|
}
|
|
@@ -42151,18 +42227,18 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42151
42227
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN:
|
|
42152
42228
|
newIndex =
|
|
42153
42229
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42154
|
-
? index - self.
|
|
42155
|
-
: index + self.
|
|
42230
|
+
? index - self.__countInRow
|
|
42231
|
+
: index + self.__countInRow;
|
|
42156
42232
|
if (chars[newIndex] === undefined) {
|
|
42157
42233
|
newIndex =
|
|
42158
42234
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42159
42235
|
? Math.floor(chars.length /
|
|
42160
|
-
self.
|
|
42161
|
-
self.
|
|
42236
|
+
self.__countInRow) *
|
|
42237
|
+
self.__countInRow +
|
|
42162
42238
|
jIndex
|
|
42163
42239
|
: jIndex;
|
|
42164
42240
|
if (newIndex > chars.length - 1) {
|
|
42165
|
-
newIndex -= self.
|
|
42241
|
+
newIndex -= self.__countInRow;
|
|
42166
42242
|
}
|
|
42167
42243
|
}
|
|
42168
42244
|
chars[newIndex] && chars[newIndex].focus();
|