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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JoditEditor_default
3
- } from "./chunk-7EWU53AA.mjs";
3
+ } from "./chunk-BFG4LOMW.mjs";
4
4
  export {
5
5
  JoditEditor_default as default
6
6
  };
@@ -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.5";
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
- doc.open();
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
- } else {
24514
- doc.body.innerHTML = value;
24515
+ return true;
24515
24516
  }
24516
- return true;
24517
+ return false;
24517
24518
  }, { top: true });
24518
24519
  }
24519
24520
  editor.editor = doc.body;
@@ -2,7 +2,7 @@ import {
2
2
  Config,
3
3
  JoditEditor_default,
4
4
  n
5
- } from "./chunk-7EWU53AA.mjs";
5
+ } from "./chunk-BFG4LOMW.mjs";
6
6
 
7
7
  // src/index.ts
8
8
  var index_default = JoditEditor_default;