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/esm/core/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.2.
|
|
6
|
+
export const APP_VERSION = "4.2.46";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -39,3 +39,21 @@ import type { IDictionary } from "../../../types";
|
|
|
39
39
|
*/
|
|
40
40
|
export declare function ConfigProto(options: IDictionary, proto: IDictionary, deep?: number): IDictionary;
|
|
41
41
|
export declare function ConfigFlatten(obj: IDictionary): IDictionary;
|
|
42
|
+
/**
|
|
43
|
+
* Returns a plain object from a prototype-based object.
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const editor = Jodit.make('#editor', {
|
|
46
|
+
* image: {
|
|
47
|
+
* dialogWidth: 500
|
|
48
|
+
* }
|
|
49
|
+
* });
|
|
50
|
+
*
|
|
51
|
+
* console.log(editor.o.image.openOnDblClick) // true
|
|
52
|
+
* // But you can't get all options in plain object
|
|
53
|
+
* console.log(JSON.stringify(editor.o.image)); // {"dialogWidth":500}
|
|
54
|
+
*
|
|
55
|
+
* const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
|
|
56
|
+
* console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function ConfigDeepFlatten(obj: IDictionary): IDictionary;
|
|
@@ -80,3 +80,28 @@ export function ConfigFlatten(obj) {
|
|
|
80
80
|
return app;
|
|
81
81
|
}, {});
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Returns a plain object from a prototype-based object.
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const editor = Jodit.make('#editor', {
|
|
87
|
+
* image: {
|
|
88
|
+
* dialogWidth: 500
|
|
89
|
+
* }
|
|
90
|
+
* });
|
|
91
|
+
*
|
|
92
|
+
* console.log(editor.o.image.openOnDblClick) // true
|
|
93
|
+
* // But you can't get all options in plain object
|
|
94
|
+
* console.log(JSON.stringify(editor.o.image)); // {"dialogWidth":500}
|
|
95
|
+
*
|
|
96
|
+
* const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
|
|
97
|
+
* console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export function ConfigDeepFlatten(obj) {
|
|
101
|
+
return keys(obj, false).reduce((app, key) => {
|
|
102
|
+
app[key] = isPlainObject(obj[key])
|
|
103
|
+
? ConfigDeepFlatten(obj[key])
|
|
104
|
+
: obj[key];
|
|
105
|
+
return app;
|
|
106
|
+
}, {});
|
|
107
|
+
}
|
package/esm/core/traits/dlgs.js
CHANGED
package/esm/jodit.js
CHANGED
|
@@ -1090,13 +1090,6 @@ let Jodit = Jodit_1 = class Jodit extends ViewWithToolbar {
|
|
|
1090
1090
|
})
|
|
1091
1091
|
.on('blur', () => (this.editorIsActive = false));
|
|
1092
1092
|
this.__prepareWYSIWYGEditor();
|
|
1093
|
-
// direction
|
|
1094
|
-
if (this.o.direction) {
|
|
1095
|
-
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
1096
|
-
this.container.style.direction = direction;
|
|
1097
|
-
this.container.setAttribute('dir', direction);
|
|
1098
|
-
this.toolbar.setDirection(direction);
|
|
1099
|
-
}
|
|
1100
1093
|
if (this.o.triggerChangeEvent) {
|
|
1101
1094
|
this.e.on('change', this.async.debounce(() => {
|
|
1102
1095
|
this.e && this.e.fire(this.element, 'change');
|
|
@@ -1114,6 +1107,9 @@ let Jodit = Jodit_1 = class Jodit extends ViewWithToolbar {
|
|
|
1114
1107
|
const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
|
|
1115
1108
|
this.editor.style.direction = direction;
|
|
1116
1109
|
this.editor.setAttribute('dir', direction);
|
|
1110
|
+
this.container.style.direction = direction;
|
|
1111
|
+
this.container.setAttribute('dir', direction);
|
|
1112
|
+
this.toolbar.setDirection(direction);
|
|
1117
1113
|
}
|
|
1118
1114
|
// proxy events
|
|
1119
1115
|
this.e
|
|
@@ -508,6 +508,10 @@ let Dialog = Dialog_1 = class Dialog extends ViewWithToolbar {
|
|
|
508
508
|
<div class="${n('resizer')}">${Icon.get('resize_handler')}</div>
|
|
509
509
|
</div>
|
|
510
510
|
</div>`);
|
|
511
|
+
if (self.options.direction === 'rtl') {
|
|
512
|
+
self.container.style.direction = 'rtl';
|
|
513
|
+
self.container.setAttribute('dir', 'rtl');
|
|
514
|
+
}
|
|
511
515
|
if (this.o.zIndex) {
|
|
512
516
|
this.container.style.zIndex = this.o.zIndex.toString();
|
|
513
517
|
}
|
|
@@ -77,6 +77,10 @@ export class AceEditor extends SourceEditor {
|
|
|
77
77
|
this.container.appendChild(fakeMirror);
|
|
78
78
|
const ace = editor.ow.ace;
|
|
79
79
|
this.instance = ace.edit(fakeMirror);
|
|
80
|
+
if (editor.o.direction === 'rtl') {
|
|
81
|
+
this.instance.setOption('rtlText', true);
|
|
82
|
+
this.instance.setOption('rtl', true);
|
|
83
|
+
}
|
|
80
84
|
this.instance.setTheme(editor.o.sourceEditorNativeOptions.theme);
|
|
81
85
|
this.instance.renderer.setShowGutter(editor.o.sourceEditorNativeOptions.showGutter);
|
|
82
86
|
this.instance
|
|
@@ -16,7 +16,8 @@ export class TextAreaEditor extends SourceEditor {
|
|
|
16
16
|
}
|
|
17
17
|
init(editor) {
|
|
18
18
|
this.instance = editor.c.element('textarea', {
|
|
19
|
-
class: 'jodit-source__mirror'
|
|
19
|
+
class: 'jodit-source__mirror',
|
|
20
|
+
dir: editor.o.direction === 'rtl' ? 'rtl' : undefined
|
|
20
21
|
});
|
|
21
22
|
this.container.appendChild(this.instance);
|
|
22
23
|
editor.e
|
package/esm/types/view.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ interface IViewOptions extends ILanguageOptions, IToolbarOptions {
|
|
|
48
48
|
disabled?: boolean;
|
|
49
49
|
readonly?: boolean;
|
|
50
50
|
iframe?: boolean;
|
|
51
|
+
direction?: 'ltr' | 'rtl' | '';
|
|
51
52
|
namespace?: string;
|
|
52
53
|
activeButtonsInReadOnly?: string[];
|
|
53
54
|
allowTabNavigation?: boolean;
|
package/package.json
CHANGED
|
@@ -39,3 +39,21 @@ import type { IDictionary } from "../../../types";
|
|
|
39
39
|
*/
|
|
40
40
|
export declare function ConfigProto(options: IDictionary, proto: IDictionary, deep?: number): IDictionary;
|
|
41
41
|
export declare function ConfigFlatten(obj: IDictionary): IDictionary;
|
|
42
|
+
/**
|
|
43
|
+
* Returns a plain object from a prototype-based object.
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const editor = Jodit.make('#editor', {
|
|
46
|
+
* image: {
|
|
47
|
+
* dialogWidth: 500
|
|
48
|
+
* }
|
|
49
|
+
* });
|
|
50
|
+
*
|
|
51
|
+
* console.log(editor.o.image.openOnDblClick) // true
|
|
52
|
+
* // But you can't get all options in plain object
|
|
53
|
+
* console.log(JSON.stringify(editor.o.image)); // {"dialogWidth":500}
|
|
54
|
+
*
|
|
55
|
+
* const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
|
|
56
|
+
* console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function ConfigDeepFlatten(obj: IDictionary): IDictionary;
|
package/types/types/view.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ interface IViewOptions extends ILanguageOptions, IToolbarOptions {
|
|
|
48
48
|
disabled?: boolean;
|
|
49
49
|
readonly?: boolean;
|
|
50
50
|
iframe?: boolean;
|
|
51
|
+
direction?: 'ltr' | 'rtl' | '';
|
|
51
52
|
namespace?: string;
|
|
52
53
|
activeButtonsInReadOnly?: string[];
|
|
53
54
|
allowTabNavigation?: boolean;
|
package/esm/polyfills.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
-
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
-
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
-
*/
|
|
6
|
-
import "classlist-polyfill";
|
|
7
|
-
import "es6-promise/auto";
|
|
8
|
-
import "core-js/es/symbol";
|
|
9
|
-
import "core-js/es/array/find-index";
|
|
10
|
-
import "core-js/es/array/from";
|
package/types/polyfills.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
-
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
-
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
-
*/
|
|
6
|
-
import "classlist-polyfill";
|
|
7
|
-
import "es6-promise/auto";
|
|
8
|
-
import "core-js/es/symbol";
|
|
9
|
-
import "core-js/es/array/find-index";
|
|
10
|
-
import "core-js/es/array/from";
|