jodit 4.14.4 → 4.14.6
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 +15 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +9 -9
- package/es2015/jodit.js +49 -34
- package/es2015/jodit.min.js +9 -9
- 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.fat.min.js +9 -9
- package/es2018/jodit.min.js +9 -9
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +10 -10
- package/es2021/jodit.js +49 -34
- package/es2021/jodit.min.js +10 -10
- 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 +1 -1
- package/es2021.en/jodit.fat.min.js +10 -10
- package/es2021.en/jodit.js +49 -34
- package/es2021.en/jodit.min.js +10 -10
- 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/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +49 -34
- package/es5/jodit.min.css +2 -2
- 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/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/dom/dom.js +2 -2
- package/esm/core/global.js +1 -1
- package/esm/core/helpers/checker/has-browser-color-picker.js +1 -1
- package/esm/core/helpers/html/apply-styles.js +1 -1
- package/esm/core/helpers/string/fuzzy-search-index.js +1 -1
- package/esm/core/helpers/utils/set.js +2 -2
- package/esm/core/storage/async-storage.js +1 -3
- package/esm/core/ui/popup/popup.js +1 -1
- package/esm/modules/image-editor/image-editor.js +1 -1
- package/esm/modules/table/table.js +2 -2
- package/esm/modules/widget/file-selector/file-selector.js +0 -1
- package/esm/plugins/ai-assistant/langs/en.js +1 -1
- package/esm/plugins/ai-assistant/langs/es.js +1 -1
- package/esm/plugins/backspace/cases/check-remove-char.js +0 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/replace-old-tags.js +0 -1
- package/esm/plugins/color/config.js +1 -1
- package/esm/plugins/copy-format/langs/ar.js +1 -1
- package/esm/plugins/copy-format/langs/cs_cz.js +1 -1
- package/esm/plugins/copy-format/langs/de.js +1 -1
- package/esm/plugins/copy-format/langs/es.js +1 -1
- package/esm/plugins/copy-format/langs/fa.js +1 -1
- package/esm/plugins/copy-format/langs/fi.js +1 -1
- package/esm/plugins/copy-format/langs/fr.js +1 -1
- package/esm/plugins/copy-format/langs/he.js +1 -1
- package/esm/plugins/copy-format/langs/hu.js +1 -1
- package/esm/plugins/copy-format/langs/id.js +1 -1
- package/esm/plugins/copy-format/langs/it.js +1 -1
- package/esm/plugins/copy-format/langs/ja.js +1 -1
- package/esm/plugins/copy-format/langs/ko.js +1 -1
- package/esm/plugins/copy-format/langs/mn.js +1 -1
- package/esm/plugins/copy-format/langs/nl.js +1 -1
- package/esm/plugins/copy-format/langs/pl.js +1 -1
- package/esm/plugins/copy-format/langs/pt_br.js +1 -1
- package/esm/plugins/copy-format/langs/ru.js +1 -1
- package/esm/plugins/copy-format/langs/tr.js +1 -1
- package/esm/plugins/copy-format/langs/zh_cn.js +1 -1
- package/esm/plugins/copy-format/langs/zh_tw.js +1 -1
- package/esm/plugins/iframe/iframe.js +28 -9
- package/esm/plugins/line-height/langs/ar.js +1 -1
- package/esm/plugins/line-height/langs/cs_cz.js +1 -1
- package/esm/plugins/line-height/langs/de.js +1 -1
- package/esm/plugins/line-height/langs/es.js +1 -1
- package/esm/plugins/line-height/langs/fa.js +1 -1
- package/esm/plugins/line-height/langs/fi.js +1 -1
- package/esm/plugins/line-height/langs/fr.js +1 -1
- package/esm/plugins/line-height/langs/he.js +1 -1
- package/esm/plugins/line-height/langs/hu.js +1 -1
- package/esm/plugins/line-height/langs/id.js +1 -1
- package/esm/plugins/line-height/langs/it.js +1 -1
- package/esm/plugins/line-height/langs/ja.js +1 -1
- package/esm/plugins/line-height/langs/ko.js +1 -1
- package/esm/plugins/line-height/langs/mn.js +1 -1
- package/esm/plugins/line-height/langs/nl.js +1 -1
- package/esm/plugins/line-height/langs/pl.js +1 -1
- package/esm/plugins/line-height/langs/pt_br.js +1 -1
- package/esm/plugins/line-height/langs/ru.js +1 -1
- package/esm/plugins/line-height/langs/sk.js +1 -1
- package/esm/plugins/line-height/langs/tr.js +1 -1
- package/esm/plugins/line-height/langs/ua.js +1 -1
- package/esm/plugins/line-height/langs/zh_cn.js +1 -1
- package/esm/plugins/line-height/langs/zh_tw.js +1 -1
- package/esm/plugins/resize-cells/resize-cells.js +2 -2
- package/esm/plugins/resizer/resizer.js +1 -1
- package/esm/plugins/search/helpers/sentence-finder.js +1 -1
- package/esm/plugins/source/source.js +1 -1
- package/esm/plugins/speech-recognize/langs/ar.js +1 -1
- package/esm/plugins/speech-recognize/langs/cs_cz.js +1 -1
- package/esm/plugins/speech-recognize/langs/de.js +1 -1
- package/esm/plugins/speech-recognize/langs/es.js +1 -1
- package/esm/plugins/speech-recognize/langs/fa.js +1 -1
- package/esm/plugins/speech-recognize/langs/fi.js +1 -1
- package/esm/plugins/speech-recognize/langs/fr.js +1 -1
- package/esm/plugins/speech-recognize/langs/he.js +1 -1
- package/esm/plugins/speech-recognize/langs/hu.js +1 -1
- package/esm/plugins/speech-recognize/langs/id.js +1 -1
- package/esm/plugins/speech-recognize/langs/it.js +1 -1
- package/esm/plugins/speech-recognize/langs/ja.js +1 -1
- package/esm/plugins/speech-recognize/langs/ko.js +1 -1
- package/esm/plugins/speech-recognize/langs/mn.js +1 -1
- package/esm/plugins/speech-recognize/langs/nl.js +1 -1
- package/esm/plugins/speech-recognize/langs/no.js +1 -1
- package/esm/plugins/speech-recognize/langs/pl.js +1 -1
- package/esm/plugins/speech-recognize/langs/pt_br.js +1 -1
- package/esm/plugins/speech-recognize/langs/ru.js +1 -1
- package/esm/plugins/speech-recognize/langs/sk.js +1 -1
- package/esm/plugins/speech-recognize/langs/tr.js +1 -1
- package/esm/plugins/speech-recognize/langs/ua.js +1 -1
- package/esm/plugins/speech-recognize/langs/zh_cn.js +1 -1
- package/esm/plugins/speech-recognize/langs/zh_tw.js +1 -1
- package/esm/plugins/spellcheck/langs/ar.js +1 -1
- package/esm/plugins/spellcheck/langs/cs_cz.js +1 -1
- package/esm/plugins/spellcheck/langs/de.js +1 -1
- package/esm/plugins/spellcheck/langs/es.js +1 -1
- package/esm/plugins/spellcheck/langs/fa.js +1 -1
- package/esm/plugins/spellcheck/langs/fi.js +1 -1
- package/esm/plugins/spellcheck/langs/fr.js +1 -1
- package/esm/plugins/spellcheck/langs/he.js +1 -1
- package/esm/plugins/spellcheck/langs/hu.js +1 -1
- package/esm/plugins/spellcheck/langs/id.js +1 -1
- package/esm/plugins/spellcheck/langs/it.js +1 -1
- package/esm/plugins/spellcheck/langs/ja.js +1 -1
- package/esm/plugins/spellcheck/langs/ko.js +1 -1
- package/esm/plugins/spellcheck/langs/mn.js +1 -1
- package/esm/plugins/spellcheck/langs/nl.js +1 -1
- package/esm/plugins/spellcheck/langs/no.js +1 -1
- package/esm/plugins/spellcheck/langs/pl.js +1 -1
- package/esm/plugins/spellcheck/langs/pt_br.js +1 -1
- package/esm/plugins/spellcheck/langs/ru.js +1 -1
- package/esm/plugins/spellcheck/langs/sk.js +1 -1
- package/esm/plugins/spellcheck/langs/tr.js +1 -1
- package/esm/plugins/spellcheck/langs/ua.js +1 -1
- package/esm/plugins/spellcheck/langs/zh_cn.js +1 -1
- package/esm/plugins/spellcheck/langs/zh_tw.js +1 -1
- package/esm/plugins/symbols/langs/ar.js +1 -1
- package/esm/plugins/symbols/langs/cs_cz.js +1 -1
- package/esm/plugins/symbols/langs/de.js +1 -1
- package/esm/plugins/symbols/langs/es.js +1 -1
- package/esm/plugins/symbols/langs/fa.js +1 -1
- package/esm/plugins/symbols/langs/fi.js +1 -1
- package/esm/plugins/symbols/langs/fr.js +1 -1
- package/esm/plugins/symbols/langs/he.js +1 -1
- package/esm/plugins/symbols/langs/hu.js +1 -1
- package/esm/plugins/symbols/langs/id.js +1 -1
- package/esm/plugins/symbols/langs/it.js +1 -1
- package/esm/plugins/symbols/langs/ja.js +1 -1
- package/esm/plugins/symbols/langs/ko.js +1 -1
- package/esm/plugins/symbols/langs/mn.js +1 -1
- package/esm/plugins/symbols/langs/nl.js +1 -1
- package/esm/plugins/symbols/langs/pl.js +1 -1
- package/esm/plugins/symbols/langs/pt_br.js +1 -1
- package/esm/plugins/symbols/langs/ru.js +1 -1
- package/esm/plugins/symbols/langs/tr.js +1 -1
- package/esm/plugins/symbols/langs/ua.js +1 -1
- package/esm/plugins/symbols/langs/zh_cn.js +1 -1
- package/esm/plugins/symbols/langs/zh_tw.js +1 -1
- package/esm/plugins/table/config.js +1 -1
- package/package.json +4 -1
package/es5/polyfills.fat.min.js
CHANGED
package/es5/polyfills.js
CHANGED
package/es5/polyfills.min.js
CHANGED
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-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.14.
|
|
6
|
+
export const APP_VERSION = "4.14.6";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
package/esm/core/dom/dom.js
CHANGED
|
@@ -43,7 +43,7 @@ export class Dom {
|
|
|
43
43
|
const first = current;
|
|
44
44
|
let last = current;
|
|
45
45
|
editor.s.save();
|
|
46
|
-
let needFindNext
|
|
46
|
+
let needFindNext;
|
|
47
47
|
do {
|
|
48
48
|
needFindNext = false;
|
|
49
49
|
tmp = last.nextSibling;
|
|
@@ -79,7 +79,7 @@ export class Dom {
|
|
|
79
79
|
let first = current;
|
|
80
80
|
let last = current;
|
|
81
81
|
editor.s.save();
|
|
82
|
-
let needFindNext
|
|
82
|
+
let needFindNext;
|
|
83
83
|
do {
|
|
84
84
|
needFindNext = false;
|
|
85
85
|
tmp = first.previousSibling;
|
package/esm/core/global.js
CHANGED
|
@@ -58,7 +58,7 @@ export function getContainer(jodit, classFunc, tag = 'div', createInsideEditor =
|
|
|
58
58
|
: 'jodit-utils';
|
|
59
59
|
const data = boxes.get(jodit) || {}, key = name + tag;
|
|
60
60
|
const view = isViewObject(jodit) ? jodit : jodit.j;
|
|
61
|
-
let body
|
|
61
|
+
let body;
|
|
62
62
|
if (!data[key]) {
|
|
63
63
|
let c = view.c;
|
|
64
64
|
body = getPopupViewRoot(view.o, view.container, jodit.od.body);
|
|
@@ -11,7 +11,7 @@ import { globalDocument } from "../../constants.js";
|
|
|
11
11
|
* Check if browser has a color picker (a new HTML5 attribute for input tag)
|
|
12
12
|
*/
|
|
13
13
|
export function hasBrowserColorPicker() {
|
|
14
|
-
let supportsColor
|
|
14
|
+
let supportsColor;
|
|
15
15
|
try {
|
|
16
16
|
const a = globalDocument.createElement('input');
|
|
17
17
|
a.type = 'color';
|
|
@@ -52,7 +52,7 @@ export function applyStyles(html) {
|
|
|
52
52
|
const iframe = globalDocument.createElement('iframe');
|
|
53
53
|
css(iframe, 'display', 'none');
|
|
54
54
|
Dom.append(globalDocument.body, iframe);
|
|
55
|
-
let convertedString = '', collection
|
|
55
|
+
let convertedString = '', collection;
|
|
56
56
|
try {
|
|
57
57
|
const iframeDoc = iframe.contentDocument ||
|
|
58
58
|
(iframe.contentWindow ? iframe.contentWindow.document : null);
|
|
@@ -12,7 +12,7 @@ import { INVISIBLE_SPACE } from "../../constants.js";
|
|
|
12
12
|
* Unlike `indexOf` ignores INVISIBLE_SPACE and may fail at `maxDistance` characters
|
|
13
13
|
*/
|
|
14
14
|
export function fuzzySearchIndex(needle, haystack, offset = 0, maxDistance = 1) {
|
|
15
|
-
let i = 0, j
|
|
15
|
+
let i = 0, j, startIndex = -1, len = 0, errorDistance = 0;
|
|
16
16
|
for (j = offset; i < needle.length && j < haystack.length;) {
|
|
17
17
|
if (needle[i].toLowerCase() === haystack[j].toLowerCase()) {
|
|
18
18
|
i++;
|
|
@@ -29,9 +29,9 @@ export function set(chain, value, obj) {
|
|
|
29
29
|
if (parts.some(isUnsafeProtoKey)) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
let result = obj
|
|
32
|
+
let result = obj;
|
|
33
33
|
for (let i = 0; i < parts.length - 1; i += 1) {
|
|
34
|
-
key = parts[i];
|
|
34
|
+
const key = parts[i];
|
|
35
35
|
if (!isArray(result[key]) && !isPlainObject(result[key])) {
|
|
36
36
|
result[key] = isNumeric(parts[i + 1]) ? [] : {};
|
|
37
37
|
}
|
|
@@ -47,7 +47,6 @@ export class AsyncStorage {
|
|
|
47
47
|
}
|
|
48
48
|
static makeStorage(persistentOrStrategy = false, suffix, options) {
|
|
49
49
|
let provider = undefined;
|
|
50
|
-
let storage = null;
|
|
51
50
|
// An explicit `defaultProvider` overrides the strategy-based selection
|
|
52
51
|
// below and decides which provider backs the storage.
|
|
53
52
|
const defaultProvider = options === null || options === void 0 ? void 0 : options.defaultProvider;
|
|
@@ -81,7 +80,6 @@ export class AsyncStorage {
|
|
|
81
80
|
if (!provider) {
|
|
82
81
|
provider = new MemoryStorageProvider();
|
|
83
82
|
}
|
|
84
|
-
|
|
85
|
-
return storage;
|
|
83
|
+
return new AsyncStorage(Promise.resolve(provider), suffix);
|
|
86
84
|
}
|
|
87
85
|
}
|
|
@@ -301,7 +301,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends ViewComponent {
|
|
|
301
301
|
};
|
|
302
302
|
this.calcCropBox = () => {
|
|
303
303
|
const node = this.crop_box.parentNode, w = node.offsetWidth * 0.8, h = node.offsetHeight * 0.8;
|
|
304
|
-
let wn
|
|
304
|
+
let wn, hn;
|
|
305
305
|
const { naturalWidth: nw, naturalHeight: nh } = this;
|
|
306
306
|
if (w > nw && h > nh) {
|
|
307
307
|
wn = nw;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
5
5
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
module.exports = {
|
|
8
8
|
aiAssistant: 'AI Assistant',
|
|
9
9
|
aiCommands: 'AI Commands',
|
|
10
10
|
'AI Assistant': 'AI Assistant',
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
5
5
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
module.exports = {
|
|
8
8
|
aiAssistant: 'Asistente de IA',
|
|
9
9
|
aiCommands: 'Comandos de IA',
|
|
10
10
|
'AI Assistant': 'Asistente de IA',
|
|
@@ -10,7 +10,6 @@ import { Dom } from "../../../../../core/dom/dom.js";
|
|
|
10
10
|
export function replaceOldTags(jodit, nodeElm, hadEffect) {
|
|
11
11
|
const newNodeElm = replaceIfMatched(jodit, nodeElm, jodit.o.cleanHTML.replaceOldTags);
|
|
12
12
|
if (nodeElm !== newNodeElm) {
|
|
13
|
-
nodeElm = newNodeElm;
|
|
14
13
|
return true;
|
|
15
14
|
}
|
|
16
15
|
return hadEffect;
|
|
@@ -79,7 +79,7 @@ Config.prototype.controls.brush = {
|
|
|
79
79
|
button.state.activated = false;
|
|
80
80
|
},
|
|
81
81
|
popup: (editor, current, close, button) => {
|
|
82
|
-
let colorHEX = '', bg_color = '', tabs
|
|
82
|
+
let colorHEX = '', bg_color = '', tabs, currentElement = null;
|
|
83
83
|
if (current && current !== editor.editor && Dom.isNode(current)) {
|
|
84
84
|
if (Dom.isElement(current) &&
|
|
85
85
|
editor.s.isCollapsed() &&
|
|
@@ -101,6 +101,26 @@ export function iframe(editor) {
|
|
|
101
101
|
}
|
|
102
102
|
return html;
|
|
103
103
|
};
|
|
104
|
+
/**
|
|
105
|
+
* Replace the whole iframe document with the given HTML.
|
|
106
|
+
*
|
|
107
|
+
* The markup is parsed in an inert document first (no browsing
|
|
108
|
+
* context: scripts do not run, sub-resources are not fetched),
|
|
109
|
+
* sanitized there via `safeHTML`, and only then moved into the
|
|
110
|
+
* live document. `document.write` on the live document would
|
|
111
|
+
* execute inline scripts and event handlers while parsing,
|
|
112
|
+
* before the sanitizer had a chance to strip them, and the
|
|
113
|
+
* iframe is same-origin with the host page by default.
|
|
114
|
+
* A `<script>` the cleaner is configured to keep still never
|
|
115
|
+
* executes: nodes coming from an inert parser are flagged
|
|
116
|
+
* "already started", exactly like `innerHTML`.
|
|
117
|
+
* See GHSA-w3xv-x3fm-59ph.
|
|
118
|
+
*/
|
|
119
|
+
const replaceDocument = (html) => {
|
|
120
|
+
const inert = new DOMParser().parseFromString(html, 'text/html');
|
|
121
|
+
editor.e.fire('safeHTML', inert.documentElement);
|
|
122
|
+
doc.replaceChild(doc.adoptNode(inert.documentElement), doc.documentElement);
|
|
123
|
+
};
|
|
104
124
|
if (docMode) {
|
|
105
125
|
const tag = editor.element.tagName;
|
|
106
126
|
if (tag !== 'TEXTAREA' && tag !== 'INPUT') {
|
|
@@ -117,21 +137,20 @@ export function iframe(editor) {
|
|
|
117
137
|
const old = doc.documentElement.outerHTML;
|
|
118
138
|
if (clearMarkers(old) !==
|
|
119
139
|
clearMarkers(value)) {
|
|
120
|
-
|
|
121
|
-
doc.write(editor.o.iframeDoctype +
|
|
122
|
-
clearMarkers(value));
|
|
123
|
-
doc.close();
|
|
140
|
+
replaceDocument(clearMarkers(value));
|
|
124
141
|
editor.editor = doc.body;
|
|
125
|
-
editor.e.fire('safeHTML', editor.editor);
|
|
126
142
|
toggleEditable();
|
|
127
143
|
editor.e.fire('prepareWYSIWYGEditor');
|
|
128
144
|
editor.e.stopPropagation('beforeSetNativeEditorValue');
|
|
129
145
|
}
|
|
146
|
+
return true;
|
|
130
147
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
148
|
+
// A partial value goes through the regular
|
|
149
|
+
// path: `clean-html` sanitizes it and the
|
|
150
|
+
// editor assigns it to `doc.body` via
|
|
151
|
+
// `innerHTML`. Writing the raw value here
|
|
152
|
+
// would fire its event handlers first.
|
|
153
|
+
return false;
|
|
135
154
|
}, { top: true });
|
|
136
155
|
}
|
|
137
156
|
editor.editor = doc.body;
|