jodit 4.2.43 → 4.2.46
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 +855 -806
- 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 +47 -15
- 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 +47 -14
- 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 +47 -14
- 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 +47 -14
- 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 +47 -15
- 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/config-proto.d.ts +18 -0
- package/esm/core/helpers/utils/config-proto.js +25 -0
- package/esm/core/traits/dlgs.js +1 -0
- package/esm/jodit.js +3 -7
- package/esm/modules/dialog/dialog.js +4 -0
- package/esm/plugins/source/editor/engines/ace.js +4 -0
- package/esm/plugins/source/editor/engines/area.js +2 -1
- package/esm/types/view.d.ts +1 -0
- package/package.json +1 -1
- package/types/core/helpers/utils/config-proto.d.ts +18 -0
- package/types/types/view.d.ts +1 -0
- package/esm/polyfills.d.ts +0 -10
- package/types/polyfills.d.ts +0 -10
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.46
|
|
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.46";
|
|
1740
1740
|
// prettier-ignore
|
|
1741
1741
|
const ES = "es2021";
|
|
1742
1742
|
const IS_ES_MODERN = true;
|
|
@@ -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; },
|
|
@@ -12857,6 +12884,7 @@ class Dlgs {
|
|
|
12857
12884
|
shadowRoot: this.o.shadowRoot,
|
|
12858
12885
|
ownerWindow: this.o.ownerWindow,
|
|
12859
12886
|
defaultTimeout: this.o.defaultTimeout,
|
|
12887
|
+
direction: this.o.direction,
|
|
12860
12888
|
theme: this.o.theme,
|
|
12861
12889
|
globalFullSize: this.o.globalFullSize,
|
|
12862
12890
|
...options
|
|
@@ -17362,13 +17390,6 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17362
17390
|
})
|
|
17363
17391
|
.on('blur', () => (this.editorIsActive = false));
|
|
17364
17392
|
this.__prepareWYSIWYGEditor();
|
|
17365
|
-
// direction
|
|
17366
|
-
if (this.o.direction) {
|
|
17367
|
-
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17368
|
-
this.container.style.direction = direction;
|
|
17369
|
-
this.container.setAttribute('dir', direction);
|
|
17370
|
-
this.toolbar.setDirection(direction);
|
|
17371
|
-
}
|
|
17372
17393
|
if (this.o.triggerChangeEvent) {
|
|
17373
17394
|
this.e.on('change', this.async.debounce(() => {
|
|
17374
17395
|
this.e && this.e.fire(this.element, 'change');
|
|
@@ -17386,6 +17407,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17386
17407
|
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17387
17408
|
this.editor.style.direction = direction;
|
|
17388
17409
|
this.editor.setAttribute('dir', direction);
|
|
17410
|
+
this.container.style.direction = direction;
|
|
17411
|
+
this.container.setAttribute('dir', direction);
|
|
17412
|
+
this.toolbar.setDirection(direction);
|
|
17389
17413
|
}
|
|
17390
17414
|
// proxy events
|
|
17391
17415
|
this.e
|
|
@@ -18359,6 +18383,10 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
|
|
|
18359
18383
|
<div class="${n('resizer')}">${jodit_core_ui__WEBPACK_IMPORTED_MODULE_9__/* .Icon */ .In.get('resize_handler')}</div>
|
|
18360
18384
|
</div>
|
|
18361
18385
|
</div>`);
|
|
18386
|
+
if (self.options.direction === 'rtl') {
|
|
18387
|
+
self.container.style.direction = 'rtl';
|
|
18388
|
+
self.container.setAttribute('dir', 'rtl');
|
|
18389
|
+
}
|
|
18362
18390
|
if (this.o.zIndex) {
|
|
18363
18391
|
this.container.style.zIndex = this.o.zIndex.toString();
|
|
18364
18392
|
}
|
|
@@ -38888,6 +38916,10 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
38888
38916
|
this.container.appendChild(fakeMirror);
|
|
38889
38917
|
const ace = editor.ow.ace;
|
|
38890
38918
|
this.instance = ace.edit(fakeMirror);
|
|
38919
|
+
if (editor.o.direction === 'rtl') {
|
|
38920
|
+
this.instance.setOption('rtlText', true);
|
|
38921
|
+
this.instance.setOption('rtl', true);
|
|
38922
|
+
}
|
|
38891
38923
|
this.instance.setTheme(editor.o.sourceEditorNativeOptions.theme);
|
|
38892
38924
|
this.instance.renderer.setShowGutter(editor.o.sourceEditorNativeOptions.showGutter);
|
|
38893
38925
|
this.instance
|
|
@@ -39050,7 +39082,8 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
|
|
|
39050
39082
|
}
|
|
39051
39083
|
init(editor) {
|
|
39052
39084
|
this.instance = editor.c.element('textarea', {
|
|
39053
|
-
class: 'jodit-source__mirror'
|
|
39085
|
+
class: 'jodit-source__mirror',
|
|
39086
|
+
dir: editor.o.direction === 'rtl' ? 'rtl' : undefined
|
|
39054
39087
|
});
|
|
39055
39088
|
this.container.appendChild(this.instance);
|
|
39056
39089
|
editor.e
|