jodit 4.17.2 → 4.17.3
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/.nvmrc +1 -0
- package/CHANGELOG.md +6 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +34 -2
- package/es2015/jodit.min.js +4 -4
- 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 +4 -4
- package/es2018/jodit.min.js +4 -4
- 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 +34 -2
- 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 +34 -2
- 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 +54 -2
- 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/helpers/html/safe-html.js +15 -0
- package/esm/jodit.js +5 -0
- package/esm/plugins/clean-html/clean-html.d.ts +8 -0
- package/esm/plugins/clean-html/clean-html.js +13 -0
- package/examples/build/es2015/jodit.min.css +1 -0
- package/examples/build/es2015/jodit.min.js +10 -0
- package/examples/build/es2015/plugins/debug/debug.min.js +10 -0
- package/examples/build/es2015/plugins/speech-recognize/speech-recognize.min.css +1 -0
- package/examples/build/es2015/plugins/speech-recognize/speech-recognize.min.js +10 -0
- package/package.json +1 -1
- package/types/plugins/clean-html/clean-html.d.ts +8 -0
package/es2021.en/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.17.
|
|
4
|
+
* Version: v4.17.3
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1799,7 +1799,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1799
1799
|
* ```
|
|
1800
1800
|
* @packageDocumentation
|
|
1801
1801
|
* @module constants
|
|
1802
|
-
*/ const APP_VERSION = "4.17.
|
|
1802
|
+
*/ const APP_VERSION = "4.17.3";
|
|
1803
1803
|
// prettier-ignore
|
|
1804
1804
|
const ES = "es2021";
|
|
1805
1805
|
const IS_ES_MODERN = true;
|
|
@@ -6197,6 +6197,21 @@ function isSmuggledForeignHtml(elm) {
|
|
|
6197
6197
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(elm);
|
|
6198
6198
|
}
|
|
6199
6199
|
}
|
|
6200
|
+
// `<noscript>` is parsed as markup in a document with scripting off (the
|
|
6201
|
+
// inert document the value is sanitized in) and as raw text in one with
|
|
6202
|
+
// scripting on (the live editor). The same serialized bytes therefore
|
|
6203
|
+
// describe two different trees, and markup hidden as inert text in the
|
|
6204
|
+
// first comes alive as elements in the second. The element has no use in
|
|
6205
|
+
// editor content, so it goes, together with everything it carried.
|
|
6206
|
+
const noscript = [];
|
|
6207
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.each(box, (node)=>{
|
|
6208
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(node) && node.nodeName === 'NOSCRIPT') {
|
|
6209
|
+
noscript.push(node);
|
|
6210
|
+
}
|
|
6211
|
+
});
|
|
6212
|
+
for (const elm of noscript){
|
|
6213
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.safeRemove(elm);
|
|
6214
|
+
}
|
|
6200
6215
|
const removeEvents = options.removeEventAttributes ?? options.removeOnError;
|
|
6201
6216
|
// Single synchronous traversal of the subtree. Besides removing event
|
|
6202
6217
|
// handlers and `javascript:` links, `sanitizeHTMLElement` neutralises
|
|
@@ -17971,6 +17986,11 @@ class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE_10__.ViewWithToolbar
|
|
|
17971
17986
|
}
|
|
17972
17987
|
if (this.editor) {
|
|
17973
17988
|
this.editor.innerHTML = data.value;
|
|
17989
|
+
// Fired synchronously, before any task can run: the value was
|
|
17990
|
+
// sanitized in an inert document and re-parsed here with scripting
|
|
17991
|
+
// on, and the two parsers do not always agree. Listeners get to
|
|
17992
|
+
// look at the tree that actually exists.
|
|
17993
|
+
this.e.fire('afterSetNativeEditorValue');
|
|
17974
17994
|
}
|
|
17975
17995
|
}
|
|
17976
17996
|
/**
|
|
@@ -28678,6 +28698,15 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
|
|
|
28678
28698
|
return false;
|
|
28679
28699
|
}
|
|
28680
28700
|
}
|
|
28701
|
+
/**
|
|
28702
|
+
* The value was sanitized in an inert document and has just been re-parsed
|
|
28703
|
+
* into the live editor with scripting on. Where the two parsers disagree
|
|
28704
|
+
* (`<noscript>`, raw-text elements), markup that was inert text a moment
|
|
28705
|
+
* ago is a real element now, so the live tree is sanitized once more, in
|
|
28706
|
+
* the same call stack, before any handler it might carry can fire.
|
|
28707
|
+
*/ onAfterSetNativeEditorValue() {
|
|
28708
|
+
;(0,jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__.safeHTML)(this.j.editor, this.j.o.cleanHTML);
|
|
28709
|
+
}
|
|
28681
28710
|
/**
|
|
28682
28711
|
* Event handler when manually assigning a value to the HTML editor.
|
|
28683
28712
|
*/ onBeforeSetNativeEditorValue(data) {
|
|
@@ -28803,6 +28832,9 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
|
|
|
28803
28832
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
28804
28833
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':beforeCommand')
|
|
28805
28834
|
], cleanHtml.prototype, "beforeCommand", null);
|
|
28835
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
28836
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':afterSetNativeEditorValue')
|
|
28837
|
+
], cleanHtml.prototype, "onAfterSetNativeEditorValue", null);
|
|
28806
28838
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
28807
28839
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':beforeSetNativeEditorValue')
|
|
28808
28840
|
], cleanHtml.prototype, "onBeforeSetNativeEditorValue", null);
|