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.en/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
|
|
@@ -20879,6 +20913,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20879
20913
|
constructor() {
|
|
20880
20914
|
super(...arguments);
|
|
20881
20915
|
this.__isBlocked = false;
|
|
20916
|
+
this.__levelOfTransaction = 0;
|
|
20882
20917
|
}
|
|
20883
20918
|
/** @override */
|
|
20884
20919
|
className() {
|
|
@@ -20959,6 +20994,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20959
20994
|
}
|
|
20960
20995
|
transaction(changes) {
|
|
20961
20996
|
this.__block(true);
|
|
20997
|
+
this.__levelOfTransaction += 1;
|
|
20962
20998
|
try {
|
|
20963
20999
|
changes();
|
|
20964
21000
|
}
|
|
@@ -20967,7 +21003,12 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
|
|
|
20967
21003
|
throw e;
|
|
20968
21004
|
}
|
|
20969
21005
|
}
|
|
20970
|
-
|
|
21006
|
+
finally {
|
|
21007
|
+
this.__levelOfTransaction -= 1;
|
|
21008
|
+
if (this.__levelOfTransaction === 0) {
|
|
21009
|
+
this.__block(false);
|
|
21010
|
+
}
|
|
21011
|
+
}
|
|
20971
21012
|
}
|
|
20972
21013
|
/**
|
|
20973
21014
|
* Creates object a snapshot of editor: html and the current selection. Current selection calculate by
|
|
@@ -23204,17 +23245,26 @@ let ToolbarButton = class ToolbarButton extends jodit_core_ui_button__WEBPACK_IM
|
|
|
23204
23245
|
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.popup)) {
|
|
23205
23246
|
const popup = this.openPopup();
|
|
23206
23247
|
popup.parentElement = this;
|
|
23207
|
-
|
|
23208
|
-
|
|
23209
|
-
|
|
23210
|
-
|
|
23211
|
-
|
|
23212
|
-
|
|
23213
|
-
|
|
23214
|
-
|
|
23215
|
-
|
|
23248
|
+
try {
|
|
23249
|
+
if (this.j.e.fire((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`before-${ctr.name}-open-popup`), this.target, ctr, popup) !== false) {
|
|
23250
|
+
const target = this.toolbar?.getTarget(this) ?? this.target ?? null;
|
|
23251
|
+
const elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
23252
|
+
if (elm) {
|
|
23253
|
+
popup
|
|
23254
|
+
.setContent((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(elm) ? this.j.c.fromHTML(elm) : elm)
|
|
23255
|
+
.open(() => (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.position)(this.container), false, this.j.o.allowTabNavigation
|
|
23256
|
+
? this.container
|
|
23257
|
+
: undefined);
|
|
23258
|
+
}
|
|
23259
|
+
else {
|
|
23260
|
+
this.__closePopup();
|
|
23261
|
+
}
|
|
23216
23262
|
}
|
|
23217
23263
|
}
|
|
23264
|
+
catch (e) {
|
|
23265
|
+
this.__closePopup();
|
|
23266
|
+
throw e;
|
|
23267
|
+
}
|
|
23218
23268
|
/**
|
|
23219
23269
|
* Fired after the popup was opened for some control button
|
|
23220
23270
|
*/
|
|
@@ -25553,6 +25603,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25553
25603
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
25554
25604
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
25555
25605
|
*/
|
|
25606
|
+
/**
|
|
25607
|
+
* @module plugins/ai-assistant
|
|
25608
|
+
*/
|
|
25556
25609
|
|
|
25557
25610
|
|
|
25558
25611
|
|
|
@@ -31129,7 +31182,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
|
|
|
31129
31182
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31130
31183
|
*/
|
|
31131
31184
|
|
|
31132
|
-
/**
|
|
31185
|
+
/**
|
|
31186
|
+
* @private
|
|
31187
|
+
*/
|
|
31133
31188
|
function readAlign(image, values) {
|
|
31134
31189
|
// Align
|
|
31135
31190
|
if (image.style.cssFloat &&
|
|
@@ -31250,6 +31305,9 @@ function readLink(state, j, values) {
|
|
|
31250
31305
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31251
31306
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31252
31307
|
*/
|
|
31308
|
+
/**
|
|
31309
|
+
* @module plugins/image-properties
|
|
31310
|
+
*/
|
|
31253
31311
|
|
|
31254
31312
|
/** @private */
|
|
31255
31313
|
function readMargins(image, values, state) {
|
|
@@ -31293,6 +31351,9 @@ function readMargins(image, values, state) {
|
|
|
31293
31351
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
31294
31352
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
31295
31353
|
*/
|
|
31354
|
+
/**
|
|
31355
|
+
* @module plugins/image-properties
|
|
31356
|
+
*/
|
|
31296
31357
|
|
|
31297
31358
|
|
|
31298
31359
|
|
|
@@ -32106,6 +32167,9 @@ function openImagePopup(j, dialog, state, button) {
|
|
|
32106
32167
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32107
32168
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32108
32169
|
*/
|
|
32170
|
+
/**
|
|
32171
|
+
* @module plugins/image-properties
|
|
32172
|
+
*/
|
|
32109
32173
|
|
|
32110
32174
|
|
|
32111
32175
|
/** @private */
|
|
@@ -32294,6 +32358,9 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
|
|
|
32294
32358
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
32295
32359
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
32296
32360
|
*/
|
|
32361
|
+
/**
|
|
32362
|
+
* @module plugins/image-properties
|
|
32363
|
+
*/
|
|
32297
32364
|
|
|
32298
32365
|
|
|
32299
32366
|
|
|
@@ -38844,6 +38911,10 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
38844
38911
|
this.container.appendChild(fakeMirror);
|
|
38845
38912
|
const ace = editor.ow.ace;
|
|
38846
38913
|
this.instance = ace.edit(fakeMirror);
|
|
38914
|
+
if (editor.o.direction === 'rtl') {
|
|
38915
|
+
this.instance.setOption('rtlText', true);
|
|
38916
|
+
this.instance.setOption('rtl', true);
|
|
38917
|
+
}
|
|
38847
38918
|
this.instance.setTheme(editor.o.sourceEditorNativeOptions.theme);
|
|
38848
38919
|
this.instance.renderer.setShowGutter(editor.o.sourceEditorNativeOptions.showGutter);
|
|
38849
38920
|
this.instance
|
|
@@ -39006,7 +39077,8 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
|
|
|
39006
39077
|
}
|
|
39007
39078
|
init(editor) {
|
|
39008
39079
|
this.instance = editor.c.element('textarea', {
|
|
39009
|
-
class: 'jodit-source__mirror'
|
|
39080
|
+
class: 'jodit-source__mirror',
|
|
39081
|
+
dir: editor.o.direction === 'rtl' ? 'rtl' : undefined
|
|
39010
39082
|
});
|
|
39011
39083
|
this.container.appendChild(this.instance);
|
|
39012
39084
|
editor.e
|
|
@@ -40183,14 +40255,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.sym
|
|
|
40183
40255
|
editor.e.on(container, 'close_dialog', close);
|
|
40184
40256
|
return box;
|
|
40185
40257
|
}
|
|
40186
|
-
|
|
40187
|
-
|
|
40188
|
-
|
|
40189
|
-
|
|
40190
|
-
|
|
40191
|
-
a && a.focus();
|
|
40192
|
-
}
|
|
40258
|
+
editor
|
|
40259
|
+
.alert(container, 'Select Special Character', undefined, 'jodit-symbols')
|
|
40260
|
+
.bindDestruct(editor);
|
|
40261
|
+
const a = container.querySelector('a');
|
|
40262
|
+
a && a.focus();
|
|
40193
40263
|
}
|
|
40264
|
+
return;
|
|
40194
40265
|
}
|
|
40195
40266
|
};
|
|
40196
40267
|
|
|
@@ -40291,17 +40362,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
40291
40362
|
class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
|
|
40292
40363
|
constructor(jodit) {
|
|
40293
40364
|
super(jodit);
|
|
40294
|
-
/** @override */
|
|
40295
40365
|
this.buttons = [
|
|
40296
40366
|
{
|
|
40297
40367
|
name: 'symbols',
|
|
40298
40368
|
group: 'insert'
|
|
40299
40369
|
}
|
|
40300
40370
|
];
|
|
40301
|
-
this.
|
|
40371
|
+
this.__countInRow = 17;
|
|
40302
40372
|
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
40303
40373
|
}
|
|
40304
|
-
/** @override */
|
|
40305
40374
|
afterInit(jodit) {
|
|
40306
40375
|
jodit.e.on('generateSpecialCharactersTable.symbols', () => {
|
|
40307
40376
|
const container = jodit.c.fromHTML(`<div class="jodit-symbols__container">
|
|
@@ -40311,10 +40380,15 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
40311
40380
|
<div class="jodit-symbols__container_preview">
|
|
40312
40381
|
<div class="jodit-symbols__preview"></div>
|
|
40313
40382
|
</div>
|
|
40314
|
-
</div>`)
|
|
40383
|
+
</div>`);
|
|
40384
|
+
const preview = container.querySelector('.jodit-symbols__preview');
|
|
40385
|
+
const table = container.querySelector('table');
|
|
40386
|
+
const body = table.tBodies[0];
|
|
40387
|
+
const chars = [];
|
|
40315
40388
|
for (let i = 0; i < jodit.o.specialCharacters.length;) {
|
|
40316
40389
|
const tr = jodit.c.element('tr');
|
|
40317
|
-
for (let j = 0; j < this.
|
|
40390
|
+
for (let j = 0; j < this.__countInRow &&
|
|
40391
|
+
i < jodit.o.specialCharacters.length; j += 1, i += 1) {
|
|
40318
40392
|
const td = jodit.c.element('td'), a = jodit.c.fromHTML(`<a
|
|
40319
40393
|
data-index="${i}"
|
|
40320
40394
|
data-index-j="${j}"
|
|
@@ -40336,7 +40410,9 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
40336
40410
|
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
|
|
40337
40411
|
jodit.s.focus();
|
|
40338
40412
|
jodit.s.insertHTML(this.innerHTML);
|
|
40339
|
-
|
|
40413
|
+
if (!e?.shiftKey) {
|
|
40414
|
+
jodit.e.fire(this, 'close_dialog');
|
|
40415
|
+
}
|
|
40340
40416
|
e && e.preventDefault();
|
|
40341
40417
|
e && e.stopImmediatePropagation();
|
|
40342
40418
|
}
|
|
@@ -40356,18 +40432,18 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
|
|
|
40356
40432
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN:
|
|
40357
40433
|
newIndex =
|
|
40358
40434
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
40359
|
-
? index - self.
|
|
40360
|
-
: index + self.
|
|
40435
|
+
? index - self.__countInRow
|
|
40436
|
+
: index + self.__countInRow;
|
|
40361
40437
|
if (chars[newIndex] === undefined) {
|
|
40362
40438
|
newIndex =
|
|
40363
40439
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
|
|
40364
40440
|
? Math.floor(chars.length /
|
|
40365
|
-
self.
|
|
40366
|
-
self.
|
|
40441
|
+
self.__countInRow) *
|
|
40442
|
+
self.__countInRow +
|
|
40367
40443
|
jIndex
|
|
40368
40444
|
: jIndex;
|
|
40369
40445
|
if (newIndex > chars.length - 1) {
|
|
40370
|
-
newIndex -= self.
|
|
40446
|
+
newIndex -= self.__countInRow;
|
|
40371
40447
|
}
|
|
40372
40448
|
}
|
|
40373
40449
|
chars[newIndex] && chars[newIndex].focus();
|