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/es2021/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
|
*/
|
|
@@ -1736,7 +1736,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1736
1736
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1737
1737
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1738
1738
|
*/
|
|
1739
|
-
const APP_VERSION = "4.2.
|
|
1739
|
+
const APP_VERSION = "4.2.45";
|
|
1740
1740
|
// prettier-ignore
|
|
1741
1741
|
const ES = "es2021";
|
|
1742
1742
|
const IS_ES_MODERN = true;
|
|
@@ -7533,10 +7533,10 @@ const buildQuery = (data, prefix) => {
|
|
|
7533
7533
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
7534
7534
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
7535
7535
|
*/
|
|
7536
|
-
|
|
7537
7536
|
/**
|
|
7538
7537
|
* @module helpers/utils
|
|
7539
7538
|
*/
|
|
7539
|
+
|
|
7540
7540
|
const completeUrl = (url) => {
|
|
7541
7541
|
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
|
|
7542
7542
|
url = 'https:' + url;
|
|
@@ -7552,8 +7552,9 @@ const completeUrl = (url) => {
|
|
|
7552
7552
|
|
|
7553
7553
|
"use strict";
|
|
7554
7554
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7555
|
-
/* harmony export */
|
|
7556
|
-
/* harmony export */
|
|
7555
|
+
/* harmony export */ VL: function() { return /* binding */ ConfigFlatten; },
|
|
7556
|
+
/* harmony export */ pi: function() { return /* binding */ ConfigDeepFlatten; },
|
|
7557
|
+
/* harmony export */ tb: function() { return /* binding */ ConfigProto; }
|
|
7557
7558
|
/* harmony export */ });
|
|
7558
7559
|
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(37923);
|
|
7559
7560
|
/* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25376);
|
|
@@ -7644,6 +7645,31 @@ function ConfigFlatten(obj) {
|
|
|
7644
7645
|
return app;
|
|
7645
7646
|
}, {});
|
|
7646
7647
|
}
|
|
7648
|
+
/**
|
|
7649
|
+
* Returns a plain object from a prototype-based object.
|
|
7650
|
+
* ```typescript
|
|
7651
|
+
* const editor = Jodit.make('#editor', {
|
|
7652
|
+
* image: {
|
|
7653
|
+
* dialogWidth: 500
|
|
7654
|
+
* }
|
|
7655
|
+
* });
|
|
7656
|
+
*
|
|
7657
|
+
* console.log(editor.o.image.openOnDblClick) // true
|
|
7658
|
+
* // But you can't get all options in plain object
|
|
7659
|
+
* console.log(JSON.stringify(editor.o.image)); // {"dialogWidth":500}
|
|
7660
|
+
*
|
|
7661
|
+
* const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
|
|
7662
|
+
* console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
|
|
7663
|
+
* ```
|
|
7664
|
+
*/
|
|
7665
|
+
function ConfigDeepFlatten(obj) {
|
|
7666
|
+
return (0,_utils__WEBPACK_IMPORTED_MODULE_1__/* .keys */ .HP)(obj, false).reduce((app, key) => {
|
|
7667
|
+
app[key] = (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_4__/* .isPlainObject */ .Q)(obj[key])
|
|
7668
|
+
? ConfigDeepFlatten(obj[key])
|
|
7669
|
+
: obj[key];
|
|
7670
|
+
return app;
|
|
7671
|
+
}, {});
|
|
7672
|
+
}
|
|
7647
7673
|
|
|
7648
7674
|
|
|
7649
7675
|
/***/ }),
|
|
@@ -8274,8 +8300,9 @@ const humanSizeToBytes = (human) => {
|
|
|
8274
8300
|
__webpack_require__.r(__webpack_exports__);
|
|
8275
8301
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8276
8302
|
/* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.$$; },
|
|
8277
|
-
/* harmony export */
|
|
8278
|
-
/* harmony export */
|
|
8303
|
+
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.pi; },
|
|
8304
|
+
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.VL; },
|
|
8305
|
+
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.tb; },
|
|
8279
8306
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.Rc; },
|
|
8280
8307
|
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_25__.d; },
|
|
8281
8308
|
/* harmony export */ OptionsError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ZW; },
|
|
@@ -11251,6 +11278,7 @@ function extractSelectedPart(wrapper, font, jodit) {
|
|
|
11251
11278
|
}
|
|
11252
11279
|
/**
|
|
11253
11280
|
* Retrieves content before after the selected area, clears it if it is empty, and inserts before after the framed selection
|
|
11281
|
+
* @private
|
|
11254
11282
|
*/
|
|
11255
11283
|
function extractAndMove(wrapper, range, left) {
|
|
11256
11284
|
const fragment = range.extractContents();
|
|
@@ -16346,7 +16374,17 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
16346
16374
|
: jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.defaultOptions.defaultTimeout;
|
|
16347
16375
|
}
|
|
16348
16376
|
/**
|
|
16349
|
-
* Method wrap usual
|
|
16377
|
+
* Method wrap usual object in Object helper for prevent deep object merging in options*
|
|
16378
|
+
* ```js
|
|
16379
|
+
* const editor = Jodit.make('#editor', {
|
|
16380
|
+
* controls: {
|
|
16381
|
+
* fontsize: {
|
|
16382
|
+
* list: Jodit.atom([8, 9, 10])
|
|
16383
|
+
* }
|
|
16384
|
+
* }
|
|
16385
|
+
* });
|
|
16386
|
+
* ```
|
|
16387
|
+
* In this case, the array [8, 9, 10] will not be combined with other arrays, but will replace them
|
|
16350
16388
|
*/
|
|
16351
16389
|
static atom(object) {
|
|
16352
16390
|
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markAsAtomic)(object);
|
|
@@ -17351,13 +17389,6 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17351
17389
|
})
|
|
17352
17390
|
.on('blur', () => (this.editorIsActive = false));
|
|
17353
17391
|
this.__prepareWYSIWYGEditor();
|
|
17354
|
-
// direction
|
|
17355
|
-
if (this.o.direction) {
|
|
17356
|
-
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17357
|
-
this.container.style.direction = direction;
|
|
17358
|
-
this.container.setAttribute('dir', direction);
|
|
17359
|
-
this.toolbar.setDirection(direction);
|
|
17360
|
-
}
|
|
17361
17392
|
if (this.o.triggerChangeEvent) {
|
|
17362
17393
|
this.e.on('change', this.async.debounce(() => {
|
|
17363
17394
|
this.e && this.e.fire(this.element, 'change');
|
|
@@ -17375,6 +17406,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17375
17406
|
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17376
17407
|
this.editor.style.direction = direction;
|
|
17377
17408
|
this.editor.setAttribute('dir', direction);
|
|
17409
|
+
this.container.style.direction = direction;
|
|
17410
|
+
this.container.setAttribute('dir', direction);
|
|
17411
|
+
this.toolbar.setDirection(direction);
|
|
17378
17412
|
}
|
|
17379
17413
|
// proxy events
|
|
17380
17414
|
this.e
|
|
@@ -20898,6 +20932,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20898
20932
|
constructor() {
|
|
20899
20933
|
super(...arguments);
|
|
20900
20934
|
this.__isBlocked = false;
|
|
20935
|
+
this.__levelOfTransaction = 0;
|
|
20901
20936
|
}
|
|
20902
20937
|
/** @override */
|
|
20903
20938
|
className() {
|
|
@@ -20978,6 +21013,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20978
21013
|
}
|
|
20979
21014
|
transaction(changes) {
|
|
20980
21015
|
this.__block(true);
|
|
21016
|
+
this.__levelOfTransaction += 1;
|
|
20981
21017
|
try {
|
|
20982
21018
|
changes();
|
|
20983
21019
|
}
|
|
@@ -20986,7 +21022,12 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20986
21022
|
throw e;
|
|
20987
21023
|
}
|
|
20988
21024
|
}
|
|
20989
|
-
|
|
21025
|
+
finally {
|
|
21026
|
+
this.__levelOfTransaction -= 1;
|
|
21027
|
+
if (this.__levelOfTransaction === 0) {
|
|
21028
|
+
this.__block(false);
|
|
21029
|
+
}
|
|
21030
|
+
}
|
|
20990
21031
|
}
|
|
20991
21032
|
/**
|
|
20992
21033
|
* Creates object a snapshot of editor: html and the current selection. Current selection calculate by
|
|
@@ -23223,17 +23264,26 @@ let ToolbarButton = class ToolbarButton extends jodit_core_ui_button__WEBPACK_IM
|
|
|
23223
23264
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.popup)) {
|
|
23224
23265
|
const popup = this.openPopup();
|
|
23225
23266
|
popup.parentElement = this;
|
|
23226
|
-
|
|
23227
|
-
|
|
23228
|
-
|
|
23229
|
-
|
|
23230
|
-
|
|
23231
|
-
|
|
23232
|
-
|
|
23233
|
-
|
|
23234
|
-
|
|
23267
|
+
try {
|
|
23268
|
+
if (this.j.e.fire((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`before-${ctr.name}-open-popup`), this.target, ctr, popup) !== false) {
|
|
23269
|
+
const target = this.toolbar?.getTarget(this) ?? this.target ?? null;
|
|
23270
|
+
const elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
23271
|
+
if (elm) {
|
|
23272
|
+
popup
|
|
23273
|
+
.setContent((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(elm) ? this.j.c.fromHTML(elm) : elm)
|
|
23274
|
+
.open(() => (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.position)(this.container), false, this.j.o.allowTabNavigation
|
|
23275
|
+
? this.container
|
|
23276
|
+
: undefined);
|
|
23277
|
+
}
|
|
23278
|
+
else {
|
|
23279
|
+
this.__closePopup();
|
|
23280
|
+
}
|
|
23235
23281
|
}
|
|
23236
23282
|
}
|
|
23283
|
+
catch (e) {
|
|
23284
|
+
this.__closePopup();
|
|
23285
|
+
throw e;
|
|
23286
|
+
}
|
|
23237
23287
|
/**
|
|
23238
23288
|
* Fired after the popup was opened for some control button
|
|
23239
23289
|
*/
|
|
@@ -25625,6 +25675,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25625
25675
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
25626
25676
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
25627
25677
|
*/
|
|
25678
|
+
/**
|
|
25679
|
+
* @module plugins/ai-assistant
|
|
25680
|
+
*/
|
|
25628
25681
|
|
|
25629
25682
|
|
|
25630
25683
|
|
|
@@ -31598,7 +31651,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
|
|
|
31598
31651
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31599
31652
|
*/
|
|
31600
31653
|
|
|
31601
|
-
/**
|
|
31654
|
+
/**
|
|
31655
|
+
* @private
|
|
31656
|
+
*/
|
|
31602
31657
|
function readAlign(image, values) {
|
|
31603
31658
|
// Align
|
|
31604
31659
|
if (image.style.cssFloat &&
|
|
@@ -31719,6 +31774,9 @@ function readLink(state, j, values) {
|
|
|
31719
31774
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31720
31775
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31721
31776
|
*/
|
|
31777
|
+
/**
|
|
31778
|
+
* @module plugins/image-properties
|
|
31779
|
+
*/
|
|
31722
31780
|
|
|
31723
31781
|
/** @private */
|
|
31724
31782
|
function readMargins(image, values, state) {
|
|
@@ -31762,6 +31820,9 @@ function readMargins(image, values, state) {
|
|
|
31762
31820
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31763
31821
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31764
31822
|
*/
|
|
31823
|
+
/**
|
|
31824
|
+
* @module plugins/image-properties
|
|
31825
|
+
*/
|
|
31765
31826
|
|
|
31766
31827
|
|
|
31767
31828
|
|
|
@@ -32575,6 +32636,9 @@ function openImagePopup(j, dialog, state, button) {
|
|
|
32575
32636
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32576
32637
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32577
32638
|
*/
|
|
32639
|
+
/**
|
|
32640
|
+
* @module plugins/image-properties
|
|
32641
|
+
*/
|
|
32578
32642
|
|
|
32579
32643
|
|
|
32580
32644
|
/** @private */
|
|
@@ -32763,6 +32827,9 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32763
32827
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32764
32828
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32765
32829
|
*/
|
|
32830
|
+
/**
|
|
32831
|
+
* @module plugins/image-properties
|
|
32832
|
+
*/
|
|
32766
32833
|
|
|
32767
32834
|
|
|
32768
32835
|
|
|
@@ -39729,6 +39796,10 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
39729
39796
|
this.container.appendChild(fakeMirror);
|
|
39730
39797
|
const ace = editor.ow.ace;
|
|
39731
39798
|
this.instance = ace.edit(fakeMirror);
|
|
39799
|
+
if (editor.o.direction === 'rtl') {
|
|
39800
|
+
this.instance.setOption('rtlText', true);
|
|
39801
|
+
this.instance.setOption('rtl', true);
|
|
39802
|
+
}
|
|
39732
39803
|
this.instance.setTheme(editor.o.sourceEditorNativeOptions.theme);
|
|
39733
39804
|
this.instance.renderer.setShowGutter(editor.o.sourceEditorNativeOptions.showGutter);
|
|
39734
39805
|
this.instance
|
|
@@ -39891,7 +39962,8 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
|
|
|
39891
39962
|
}
|
|
39892
39963
|
init(editor) {
|
|
39893
39964
|
this.instance = editor.c.element('textarea', {
|
|
39894
|
-
class: 'jodit-source__mirror'
|
|
39965
|
+
class: 'jodit-source__mirror',
|
|
39966
|
+
dir: editor.o.direction === 'rtl' ? 'rtl' : undefined
|
|
39895
39967
|
});
|
|
39896
39968
|
this.container.appendChild(this.instance);
|
|
39897
39969
|
editor.e
|
|
@@ -41484,14 +41556,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.sym
|
|
|
41484
41556
|
editor.e.on(container, 'close_dialog', close);
|
|
41485
41557
|
return box;
|
|
41486
41558
|
}
|
|
41487
|
-
|
|
41488
|
-
|
|
41489
|
-
|
|
41490
|
-
|
|
41491
|
-
|
|
41492
|
-
a && a.focus();
|
|
41493
|
-
}
|
|
41559
|
+
editor
|
|
41560
|
+
.alert(container, 'Select Special Character', undefined, 'jodit-symbols')
|
|
41561
|
+
.bindDestruct(editor);
|
|
41562
|
+
const a = container.querySelector('a');
|
|
41563
|
+
a && a.focus();
|
|
41494
41564
|
}
|
|
41565
|
+
return;
|
|
41495
41566
|
}
|
|
41496
41567
|
};
|
|
41497
41568
|
|
|
@@ -42008,17 +42079,15 @@ module.exports = {
|
|
|
42008
42079
|
class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
|
|
42009
42080
|
constructor(jodit) {
|
|
42010
42081
|
super(jodit);
|
|
42011
|
-
/** @override */
|
|
42012
42082
|
this.buttons = [
|
|
42013
42083
|
{
|
|
42014
42084
|
name: 'symbols',
|
|
42015
42085
|
group: 'insert'
|
|
42016
42086
|
}
|
|
42017
42087
|
];
|
|
42018
|
-
this.
|
|
42088
|
+
this.__countInRow = 17;
|
|
42019
42089
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
42020
42090
|
}
|
|
42021
|
-
/** @override */
|
|
42022
42091
|
afterInit(jodit) {
|
|
42023
42092
|
jodit.e.on('generateSpecialCharactersTable.symbols', () => {
|
|
42024
42093
|
const container = jodit.c.fromHTML(`<div class="jodit-symbols__container">
|
|
@@ -42028,10 +42097,15 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42028
42097
|
<div class="jodit-symbols__container_preview">
|
|
42029
42098
|
<div class="jodit-symbols__preview"></div>
|
|
42030
42099
|
</div>
|
|
42031
|
-
</div>`)
|
|
42100
|
+
</div>`);
|
|
42101
|
+
const preview = container.querySelector('.jodit-symbols__preview');
|
|
42102
|
+
const table = container.querySelector('table');
|
|
42103
|
+
const body = table.tBodies[0];
|
|
42104
|
+
const chars = [];
|
|
42032
42105
|
for (let i = 0; i < jodit.o.specialCharacters.length;) {
|
|
42033
42106
|
const tr = jodit.c.element('tr');
|
|
42034
|
-
for (let j = 0; j < this.
|
|
42107
|
+
for (let j = 0; j < this.__countInRow &&
|
|
42108
|
+
i < jodit.o.specialCharacters.length; j += 1, i += 1) {
|
|
42035
42109
|
const td = jodit.c.element('td'), a = jodit.c.fromHTML(`<a
|
|
42036
42110
|
data-index="${i}"
|
|
42037
42111
|
data-index-j="${j}"
|
|
@@ -42053,7 +42127,9 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42053
42127
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
|
|
42054
42128
|
jodit.s.focus();
|
|
42055
42129
|
jodit.s.insertHTML(this.innerHTML);
|
|
42056
|
-
|
|
42130
|
+
if (!e?.shiftKey) {
|
|
42131
|
+
jodit.e.fire(this, 'close_dialog');
|
|
42132
|
+
}
|
|
42057
42133
|
e && e.preventDefault();
|
|
42058
42134
|
e && e.stopImmediatePropagation();
|
|
42059
42135
|
}
|
|
@@ -42073,18 +42149,18 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
42073
42149
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN:
|
|
42074
42150
|
newIndex =
|
|
42075
42151
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42076
|
-
? index - self.
|
|
42077
|
-
: index + self.
|
|
42152
|
+
? index - self.__countInRow
|
|
42153
|
+
: index + self.__countInRow;
|
|
42078
42154
|
if (chars[newIndex] === undefined) {
|
|
42079
42155
|
newIndex =
|
|
42080
42156
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
42081
42157
|
? Math.floor(chars.length /
|
|
42082
|
-
self.
|
|
42083
|
-
self.
|
|
42158
|
+
self.__countInRow) *
|
|
42159
|
+
self.__countInRow +
|
|
42084
42160
|
jIndex
|
|
42085
42161
|
: jIndex;
|
|
42086
42162
|
if (newIndex > chars.length - 1) {
|
|
42087
|
-
newIndex -= self.
|
|
42163
|
+
newIndex -= self.__countInRow;
|
|
42088
42164
|
}
|
|
42089
42165
|
}
|
|
42090
42166
|
chars[newIndex] && chars[newIndex].focus();
|