jodit 4.2.43 → 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 +46 -0
- 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 +42 -14
- 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 +42 -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 +42 -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 +42 -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 +42 -14
- 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/jodit.js +3 -7
- package/esm/plugins/source/editor/engines/ace.js +4 -0
- package/esm/plugins/source/editor/engines/area.js +2 -1
- package/package.json +1 -1
- package/types/core/helpers/utils/config-proto.d.ts +18 -0
package/es2018/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 = "es2018";
|
|
1741
1741
|
const IS_ES_MODERN = true;
|
|
@@ -7569,8 +7569,9 @@ const completeUrl = (url) => {
|
|
|
7569
7569
|
|
|
7570
7570
|
"use strict";
|
|
7571
7571
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7572
|
-
/* harmony export */
|
|
7573
|
-
/* harmony export */
|
|
7572
|
+
/* harmony export */ VL: function() { return /* binding */ ConfigFlatten; },
|
|
7573
|
+
/* harmony export */ pi: function() { return /* binding */ ConfigDeepFlatten; },
|
|
7574
|
+
/* harmony export */ tb: function() { return /* binding */ ConfigProto; }
|
|
7574
7575
|
/* harmony export */ });
|
|
7575
7576
|
/* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(37923);
|
|
7576
7577
|
/* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25376);
|
|
@@ -7661,6 +7662,31 @@ function ConfigFlatten(obj) {
|
|
|
7661
7662
|
return app;
|
|
7662
7663
|
}, {});
|
|
7663
7664
|
}
|
|
7665
|
+
/**
|
|
7666
|
+
* Returns a plain object from a prototype-based object.
|
|
7667
|
+
* ```typescript
|
|
7668
|
+
* const editor = Jodit.make('#editor', {
|
|
7669
|
+
* image: {
|
|
7670
|
+
* dialogWidth: 500
|
|
7671
|
+
* }
|
|
7672
|
+
* });
|
|
7673
|
+
*
|
|
7674
|
+
* console.log(editor.o.image.openOnDblClick) // true
|
|
7675
|
+
* // But you can't get all options in plain object
|
|
7676
|
+
* console.log(JSON.stringify(editor.o.image)); // {"dialogWidth":500}
|
|
7677
|
+
*
|
|
7678
|
+
* const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
|
|
7679
|
+
* console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
|
|
7680
|
+
* ```
|
|
7681
|
+
*/
|
|
7682
|
+
function ConfigDeepFlatten(obj) {
|
|
7683
|
+
return (0,_utils__WEBPACK_IMPORTED_MODULE_1__/* .keys */ .HP)(obj, false).reduce((app, key) => {
|
|
7684
|
+
app[key] = (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_4__/* .isPlainObject */ .Q)(obj[key])
|
|
7685
|
+
? ConfigDeepFlatten(obj[key])
|
|
7686
|
+
: obj[key];
|
|
7687
|
+
return app;
|
|
7688
|
+
}, {});
|
|
7689
|
+
}
|
|
7664
7690
|
|
|
7665
7691
|
|
|
7666
7692
|
/***/ }),
|
|
@@ -8292,8 +8318,9 @@ const humanSizeToBytes = (human) => {
|
|
|
8292
8318
|
__webpack_require__.r(__webpack_exports__);
|
|
8293
8319
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8294
8320
|
/* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.$$; },
|
|
8295
|
-
/* harmony export */
|
|
8296
|
-
/* harmony export */
|
|
8321
|
+
/* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.pi; },
|
|
8322
|
+
/* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.VL; },
|
|
8323
|
+
/* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.tb; },
|
|
8297
8324
|
/* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.Rc; },
|
|
8298
8325
|
/* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_25__.d; },
|
|
8299
8326
|
/* harmony export */ OptionsError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ZW; },
|
|
@@ -17416,13 +17443,6 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17416
17443
|
})
|
|
17417
17444
|
.on('blur', () => (this.editorIsActive = false));
|
|
17418
17445
|
this.__prepareWYSIWYGEditor();
|
|
17419
|
-
// direction
|
|
17420
|
-
if (this.o.direction) {
|
|
17421
|
-
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17422
|
-
this.container.style.direction = direction;
|
|
17423
|
-
this.container.setAttribute('dir', direction);
|
|
17424
|
-
this.toolbar.setDirection(direction);
|
|
17425
|
-
}
|
|
17426
17446
|
if (this.o.triggerChangeEvent) {
|
|
17427
17447
|
this.e.on('change', this.async.debounce(() => {
|
|
17428
17448
|
this.e && this.e.fire(this.element, 'change');
|
|
@@ -17440,6 +17460,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17440
17460
|
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
17441
17461
|
this.editor.style.direction = direction;
|
|
17442
17462
|
this.editor.setAttribute('dir', direction);
|
|
17463
|
+
this.container.style.direction = direction;
|
|
17464
|
+
this.container.setAttribute('dir', direction);
|
|
17465
|
+
this.toolbar.setDirection(direction);
|
|
17443
17466
|
}
|
|
17444
17467
|
// proxy events
|
|
17445
17468
|
this.e
|
|
@@ -39891,6 +39914,10 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
39891
39914
|
this.container.appendChild(fakeMirror);
|
|
39892
39915
|
const ace = editor.ow.ace;
|
|
39893
39916
|
this.instance = ace.edit(fakeMirror);
|
|
39917
|
+
if (editor.o.direction === 'rtl') {
|
|
39918
|
+
this.instance.setOption('rtlText', true);
|
|
39919
|
+
this.instance.setOption('rtl', true);
|
|
39920
|
+
}
|
|
39894
39921
|
this.instance.setTheme(editor.o.sourceEditorNativeOptions.theme);
|
|
39895
39922
|
this.instance.renderer.setShowGutter(editor.o.sourceEditorNativeOptions.showGutter);
|
|
39896
39923
|
this.instance
|
|
@@ -40054,7 +40081,8 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
|
|
|
40054
40081
|
}
|
|
40055
40082
|
init(editor) {
|
|
40056
40083
|
this.instance = editor.c.element('textarea', {
|
|
40057
|
-
class: 'jodit-source__mirror'
|
|
40084
|
+
class: 'jodit-source__mirror',
|
|
40085
|
+
dir: editor.o.direction === 'rtl' ? 'rtl' : undefined
|
|
40058
40086
|
});
|
|
40059
40087
|
this.container.appendChild(this.instance);
|
|
40060
40088
|
editor.e
|