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/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.46
|
|
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.46";
|
|
1739
1739
|
// prettier-ignore
|
|
1740
1740
|
const ES = "es2015";
|
|
1741
1741
|
const IS_ES_MODERN = true;
|
|
@@ -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; },
|
|
@@ -12874,7 +12901,7 @@ class Storage {
|
|
|
12874
12901
|
|
|
12875
12902
|
class Dlgs {
|
|
12876
12903
|
dlg(options) {
|
|
12877
|
-
const dialog = new jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .lG(Object.assign({ language: this.o.language, shadowRoot: this.o.shadowRoot, ownerWindow: this.o.ownerWindow, defaultTimeout: this.o.defaultTimeout, theme: this.o.theme, globalFullSize: this.o.globalFullSize }, options));
|
|
12904
|
+
const dialog = new jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .lG(Object.assign({ language: this.o.language, shadowRoot: this.o.shadowRoot, ownerWindow: this.o.ownerWindow, defaultTimeout: this.o.defaultTimeout, direction: this.o.direction, theme: this.o.theme, globalFullSize: this.o.globalFullSize }, options));
|
|
12878
12905
|
(0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_1__/* .markOwner */ .b_)(this, dialog.container);
|
|
12879
12906
|
dialog.parent = this;
|
|
12880
12907
|
return dialog.bindDestruct(this);
|
|
@@ -17361,13 +17388,6 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17361
17388
|
})
|
|
17362
17389
|
.on('blur', () => (this.editorIsActive = false));
|
|
17363
17390
|
this.__prepareWYSIWYGEditor();
|
|
17364
|
-
// direction
|
|
17365
|
-
if (this.o.direction) {
|
|
17366
|
-
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17367
|
-
this.container.style.direction = direction;
|
|
17368
|
-
this.container.setAttribute('dir', direction);
|
|
17369
|
-
this.toolbar.setDirection(direction);
|
|
17370
|
-
}
|
|
17371
17391
|
if (this.o.triggerChangeEvent) {
|
|
17372
17392
|
this.e.on('change', this.async.debounce(() => {
|
|
17373
17393
|
this.e && this.e.fire(this.element, 'change');
|
|
@@ -17385,6 +17405,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17385
17405
|
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17386
17406
|
this.editor.style.direction = direction;
|
|
17387
17407
|
this.editor.setAttribute('dir', direction);
|
|
17408
|
+
this.container.style.direction = direction;
|
|
17409
|
+
this.container.setAttribute('dir', direction);
|
|
17410
|
+
this.toolbar.setDirection(direction);
|
|
17388
17411
|
}
|
|
17389
17412
|
// proxy events
|
|
17390
17413
|
this.e
|
|
@@ -18376,6 +18399,10 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
|
|
|
18376
18399
|
<div class="${n('resizer')}">${jodit_core_ui__WEBPACK_IMPORTED_MODULE_9__/* .Icon */ .In.get('resize_handler')}</div>
|
|
18377
18400
|
</div>
|
|
18378
18401
|
</div>`);
|
|
18402
|
+
if (self.options.direction === 'rtl') {
|
|
18403
|
+
self.container.style.direction = 'rtl';
|
|
18404
|
+
self.container.setAttribute('dir', 'rtl');
|
|
18405
|
+
}
|
|
18379
18406
|
if (this.o.zIndex) {
|
|
18380
18407
|
this.container.style.zIndex = this.o.zIndex.toString();
|
|
18381
18408
|
}
|
|
@@ -39836,6 +39863,10 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
39836
39863
|
this.container.appendChild(fakeMirror);
|
|
39837
39864
|
const ace = editor.ow.ace;
|
|
39838
39865
|
this.instance = ace.edit(fakeMirror);
|
|
39866
|
+
if (editor.o.direction === 'rtl') {
|
|
39867
|
+
this.instance.setOption('rtlText', true);
|
|
39868
|
+
this.instance.setOption('rtl', true);
|
|
39869
|
+
}
|
|
39839
39870
|
this.instance.setTheme(editor.o.sourceEditorNativeOptions.theme);
|
|
39840
39871
|
this.instance.renderer.setShowGutter(editor.o.sourceEditorNativeOptions.showGutter);
|
|
39841
39872
|
this.instance
|
|
@@ -39999,7 +40030,8 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
|
|
|
39999
40030
|
}
|
|
40000
40031
|
init(editor) {
|
|
40001
40032
|
this.instance = editor.c.element('textarea', {
|
|
40002
|
-
class: 'jodit-source__mirror'
|
|
40033
|
+
class: 'jodit-source__mirror',
|
|
40034
|
+
dir: editor.o.direction === 'rtl' ? 'rtl' : undefined
|
|
40003
40035
|
});
|
|
40004
40036
|
this.container.appendChild(this.instance);
|
|
40005
40037
|
editor.e
|