jodit 4.14.5 → 4.14.7
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 +12 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +5 -5
- package/es2015/jodit.js +92 -61
- package/es2015/jodit.min.js +5 -5
- 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 +5 -5
- package/es2018/jodit.min.js +5 -5
- 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 +5 -5
- package/es2021/jodit.js +92 -61
- package/es2021/jodit.min.js +5 -5
- 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 +5 -5
- package/es2021.en/jodit.js +92 -61
- package/es2021.en/jodit.min.js +5 -5
- 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 +92 -61
- 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/modules/file-browser/builders/context-menu.js +1 -1
- package/esm/plugins/iframe/iframe.js +28 -9
- package/esm/styles/icons/download.svg.js +1 -0
- package/esm/styles/icons/index.d.ts +1 -1
- package/esm/styles/icons/index.js +2 -1
- package/package.json +1 -1
- package/types/styles/icons/index.d.ts +1 -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.7";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 1792\"> <path d=\"M1344 1344q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm256 0q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128-224v320q0 40-28 68t-68 28h-1472q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h465l135 136q58 56 136 56t136-56l136-136h464q40 0 68 28t28 68zm-325-569q17 41-14 70l-448 448q-18 19-45 19t-45-19l-448-448q-31-29-14-70 17-39 59-39h256v-448q0-26 19-45t45-19h256q26 0 45 19t19 45v448h256q42 0 59 39z\"/> </svg> ";
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module icons
|
|
10
10
|
*/
|
|
11
|
-
export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
11
|
+
export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
@@ -18,6 +18,7 @@ import center from "./center.svg.js";
|
|
|
18
18
|
import check from "./check.svg.js";
|
|
19
19
|
import chevron from "./chevron.svg.js";
|
|
20
20
|
import dots from "./dots.svg.js";
|
|
21
|
+
import download from "./download.svg.js";
|
|
21
22
|
import eye from "./eye.svg.js";
|
|
22
23
|
import file from "./file.svg.js";
|
|
23
24
|
import folder from "./folder.svg.js";
|
|
@@ -35,4 +36,4 @@ import unlock from "./unlock.svg.js";
|
|
|
35
36
|
import update from "./update.svg.js";
|
|
36
37
|
import upload from "./upload.svg.js";
|
|
37
38
|
import valign from "./valign.svg.js";
|
|
38
|
-
export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
39
|
+
export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
package/package.json
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module icons
|
|
10
10
|
*/
|
|
11
|
-
export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|
|
11
|
+
export { angle_down, angle_left, angle_right, angle_up, bin, cancel, center, check, chevron, dots, download, eye, file, folder, info_circle, left, lock, ok, pencil, plus, resize_handler, right, save, settings, unlock, update, upload, valign };
|