jodit-pro-react 5.6.4 → 5.6.5
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.
|
@@ -193,7 +193,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
|
|
|
193
193
|
var init_constants = __esm({
|
|
194
194
|
"node_modules/jodit/esm/core/constants.js"() {
|
|
195
195
|
"use strict";
|
|
196
|
-
APP_VERSION = "4.14.
|
|
196
|
+
APP_VERSION = "4.14.6";
|
|
197
197
|
ES = "es2020";
|
|
198
198
|
IS_ES_MODERN = true;
|
|
199
199
|
IS_ES_NEXT = true;
|
|
@@ -24489,6 +24489,11 @@ function iframe(editor) {
|
|
|
24489
24489
|
}
|
|
24490
24490
|
return html;
|
|
24491
24491
|
};
|
|
24492
|
+
const replaceDocument = (html) => {
|
|
24493
|
+
const inert = new DOMParser().parseFromString(html, "text/html");
|
|
24494
|
+
editor.e.fire("safeHTML", inert.documentElement);
|
|
24495
|
+
doc.replaceChild(doc.adoptNode(inert.documentElement), doc.documentElement);
|
|
24496
|
+
};
|
|
24492
24497
|
if (docMode) {
|
|
24493
24498
|
const tag = editor.element.tagName;
|
|
24494
24499
|
if (tag !== "TEXTAREA" && tag !== "INPUT") {
|
|
@@ -24501,19 +24506,15 @@ function iframe(editor) {
|
|
|
24501
24506
|
if (/<(html|body)/i.test(value)) {
|
|
24502
24507
|
const old = doc.documentElement.outerHTML;
|
|
24503
24508
|
if (clearMarkers(old) !== clearMarkers(value)) {
|
|
24504
|
-
|
|
24505
|
-
doc.write(editor.o.iframeDoctype + clearMarkers(value));
|
|
24506
|
-
doc.close();
|
|
24509
|
+
replaceDocument(clearMarkers(value));
|
|
24507
24510
|
editor.editor = doc.body;
|
|
24508
|
-
editor.e.fire("safeHTML", editor.editor);
|
|
24509
24511
|
toggleEditable();
|
|
24510
24512
|
editor.e.fire("prepareWYSIWYGEditor");
|
|
24511
24513
|
editor.e.stopPropagation("beforeSetNativeEditorValue");
|
|
24512
24514
|
}
|
|
24513
|
-
|
|
24514
|
-
doc.body.innerHTML = value;
|
|
24515
|
+
return true;
|
|
24515
24516
|
}
|
|
24516
|
-
return
|
|
24517
|
+
return false;
|
|
24517
24518
|
}, { top: true });
|
|
24518
24519
|
}
|
|
24519
24520
|
editor.editor = doc.body;
|