jodit-pro-react 5.6.4 → 5.6.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JoditEditor_default
3
- } from "./chunk-7EWU53AA.mjs";
3
+ } from "./chunk-M6IS24ZD.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.7";
197
197
  ES = "es2020";
198
198
  IS_ES_MODERN = true;
199
199
  IS_ES_NEXT = true;
@@ -15436,7 +15436,7 @@ var context_menu_default = (self2) => {
15436
15436
  }
15437
15437
  } : false,
15438
15438
  {
15439
- icon: "upload",
15439
+ icon: "download",
15440
15440
  title: "Download",
15441
15441
  exec: () => {
15442
15442
  const url2 = ga("href");
@@ -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;
@@ -35678,6 +35679,7 @@ __export(icons_exports, {
35678
35679
  check: () => check_svg_default,
35679
35680
  chevron: () => chevron_svg_default,
35680
35681
  dots: () => dots_svg_default,
35682
+ download: () => download_svg_default,
35681
35683
  eye: () => eye_svg_default,
35682
35684
  file: () => file_svg_default,
35683
35685
  folder: () => folder_svg_default,
@@ -35727,6 +35729,9 @@ var chevron_svg_default = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0
35727
35729
  // node_modules/jodit/esm/styles/icons/dots.svg.js
35728
35730
  var dots_svg_default = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24" > <circle cx="12" cy="12" r="2.2"/> <circle cx="12" cy="5" r="2.2"/> <circle cx="12" cy="19" r="2.2"/> </svg> `;
35729
35731
 
35732
+ // node_modules/jodit/esm/styles/icons/download.svg.js
35733
+ var download_svg_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> `;
35734
+
35730
35735
  // node_modules/jodit/esm/styles/icons/eye.svg.js
35731
35736
  var eye_svg_default = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 117-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z"/> </svg> `;
35732
35737
 
@@ -2,7 +2,7 @@ import {
2
2
  Config,
3
3
  JoditEditor_default,
4
4
  n
5
- } from "./chunk-7EWU53AA.mjs";
5
+ } from "./chunk-M6IS24ZD.mjs";
6
6
 
7
7
  // src/index.ts
8
8
  var index_default = JoditEditor_default;