@editora/core 1.0.6 → 1.0.8

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.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/dist/{AnchorPlugin.native-C1Rw5m04.mjs → AnchorPlugin.native-BcYGEtd9.mjs} +129 -105
  3. package/dist/ApprovalWorkflowPlugin.native-C3jtAYjG.mjs +1076 -0
  4. package/dist/{BackgroundColorPlugin.native-BE-p9DRd.mjs → BackgroundColorPlugin.native-50iAT9xU.mjs} +119 -122
  5. package/dist/BlocksLibraryPlugin.native-HMWKxWNs.mjs +1327 -0
  6. package/dist/CitationsPlugin.native-BnU0qCwR.mjs +1464 -0
  7. package/dist/CodePlugin.native-DlpTPdkd.mjs +2691 -0
  8. package/dist/{CommentsPlugin.native-tMnWn8a2.mjs → CommentsPlugin.native-DPSqTkiv.mjs} +153 -135
  9. package/dist/ConditionalContentPlugin.native-CfhY46rU.mjs +1367 -0
  10. package/dist/ContentRulesPlugin.native-nBLQ8QFZ.mjs +1099 -0
  11. package/dist/DataBindingPlugin.native-jQ1JPRTp.mjs +917 -0
  12. package/dist/DocSchemaPlugin.native-CHOge18O.mjs +1325 -0
  13. package/dist/{DocumentManagerPlugin.native-BvZL5CSG.mjs → DocumentManagerPlugin.native-C2cs_1w4.mjs} +43 -43
  14. package/dist/{EmbedIframePlugin.native-CSWIB1jm.mjs → EmbedIframePlugin.native-DKJx2OS7.mjs} +61 -58
  15. package/dist/{EmojisPlugin.native-DxTm_DL-.mjs → EmojisPlugin.native-CitxxlWX.mjs} +135 -104
  16. package/dist/{LinkPlugin.native-CS2g-G18.mjs → LinkPlugin.native-DYCIcdTm.mjs} +47 -45
  17. package/dist/{MathPlugin.native-KUxz0o8C.mjs → MathPlugin.native-f_mDp8VL.mjs} +149 -108
  18. package/dist/{MediaManagerPlugin.native-CgP5iInD.mjs → MediaManagerPlugin.native-BiXiK8FC.mjs} +238 -217
  19. package/dist/MentionPlugin.native-BMDlOqur.mjs +734 -0
  20. package/dist/MergeTagPlugin.native-C3eOfEgw.mjs +559 -0
  21. package/dist/PIIRedactionPlugin.native-DcsjmtV1.mjs +1396 -0
  22. package/dist/{PageBreakPlugin.native-CGiQxXqR.mjs → PageBreakPlugin.native-DijGuHJZ.mjs} +86 -77
  23. package/dist/{PreviewPlugin.native-DBvfpmIv.mjs → PreviewPlugin.native-WuIwOAOR.mjs} +30 -30
  24. package/dist/SlashCommandsPlugin.native-CmxvMEaE.mjs +755 -0
  25. package/dist/SmartPastePlugin.native-BOKKtF07.mjs +1398 -0
  26. package/dist/{SpecialCharactersPlugin.native-DANrbExJ.mjs → SpecialCharactersPlugin.native-CZDato89.mjs} +143 -98
  27. package/dist/{SpellCheckPlugin.native-C8bPvRHy.mjs → SpellCheckPlugin.native-BZB9AewP.mjs} +239 -219
  28. package/dist/{TemplatePlugin.native-4lKEm-WY.mjs → TemplatePlugin.native-CrpfKRJ8.mjs} +167 -143
  29. package/dist/{TextColorPlugin.native-Clgtb50j.mjs → TextColorPlugin.native-Bwl_bSmc.mjs} +134 -118
  30. package/dist/TrackChangesPlugin.native-Bghu2q4a.mjs +761 -0
  31. package/dist/TranslationWorkflowPlugin.native-Bz6jDGvj.mjs +1728 -0
  32. package/dist/VersionDiffPlugin.native-Bvxgy--t.mjs +776 -0
  33. package/dist/_commonjsHelpers-DOllISpa.mjs +32 -0
  34. package/dist/anchoredPopover-Bxds0VoB.mjs +110 -0
  35. package/dist/documentManager-vQ1VkbUY.mjs +8418 -0
  36. package/dist/editora.min.js +13 -13
  37. package/dist/editora.umd.js +13 -13
  38. package/dist/html2canvas.esm-AYkPY5LS.mjs +4803 -0
  39. package/dist/index-BslAFzmv.mjs +16544 -0
  40. package/dist/index-D1LOqg5C.js +10 -0
  41. package/dist/{index-OwnkG39N.mjs → index-DqC57IEH.mjs} +438 -328
  42. package/dist/index.cjs.js +1 -1
  43. package/dist/{index.es-CuicffkQ.mjs → index.es-BYD2KEo6.mjs} +5 -4
  44. package/dist/index.esm.js +2 -2
  45. package/dist/jspdf.es.min-BJGtOnRT.mjs +7890 -0
  46. package/dist/plugin-loader.js +77 -40
  47. package/dist/webcomponent-core.js +456 -346
  48. package/dist/webcomponent-core.min.css +1 -1
  49. package/dist/webcomponent-core.min.js +87 -107
  50. package/dist/webcomponent.cjs.js +1 -1
  51. package/dist/webcomponent.esm.js +1 -1
  52. package/dist/webcomponent.js +503 -356
  53. package/dist/webcomponent.min.css +1 -1
  54. package/dist/webcomponent.min.js +6003 -658
  55. package/package.json +2 -2
  56. package/dist/CodePlugin.native-B263UI8O.mjs +0 -2173
  57. package/dist/MergeTagPlugin.native-DIGWhdnF.mjs +0 -419
  58. package/dist/colorSelectionApply-CK1My9N2.mjs +0 -67
  59. package/dist/documentManager-irzj9n3V.mjs +0 -37627
  60. package/dist/index-CqWQFb3D.js +0 -10
@@ -1,4 +1,4 @@
1
- const i = () => ({
1
+ const c = () => ({
2
2
  name: "document-manager",
3
3
  toolbar: [
4
4
  {
@@ -22,15 +22,15 @@ const i = () => ({
22
22
  ],
23
23
  commands: {
24
24
  importWord: () => {
25
- const d = () => {
25
+ const l = () => {
26
26
  const e = window.getSelection();
27
27
  if (e && e.rangeCount > 0) {
28
28
  let r = e.getRangeAt(0).startContainer;
29
29
  for (; r && r !== document.body; ) {
30
30
  if (r.nodeType === Node.ELEMENT_NODE) {
31
- const l = r;
32
- if (l.getAttribute("contenteditable") === "true")
33
- return l;
31
+ const d = r;
32
+ if (d.getAttribute("contenteditable") === "true")
33
+ return d;
34
34
  }
35
35
  r = r.parentNode;
36
36
  }
@@ -38,79 +38,79 @@ const i = () => ({
38
38
  const n = document.activeElement;
39
39
  if ((n == null ? void 0 : n.getAttribute("contenteditable")) === "true")
40
40
  return n;
41
- const t = n == null ? void 0 : n.closest('[contenteditable="true"]');
42
- return t || document.querySelector('[contenteditable="true"]');
43
- }, o = document.createElement("input");
44
- return o.type = "file", o.accept = ".docx", o.onchange = async (e) => {
45
- var t;
46
- const n = (t = e.target.files) == null ? void 0 : t[0];
41
+ const o = n == null ? void 0 : n.closest('[contenteditable="true"]');
42
+ return o || document.querySelector('[contenteditable="true"]');
43
+ }, t = document.createElement("input");
44
+ return t.type = "file", t.accept = ".docx", t.onchange = async (e) => {
45
+ var o;
46
+ const n = (o = e.target.files) == null ? void 0 : o[0];
47
47
  if (n)
48
48
  try {
49
- const r = d();
49
+ const r = l();
50
50
  if (r) {
51
- const { importFromWord: l } = await import("./documentManager-irzj9n3V.mjs").then((c) => c.d), a = await l(n);
51
+ const { importFromWord: d } = await import("./documentManager-vQ1VkbUY.mjs"), a = await d(n);
52
52
  r.innerHTML = a, r.dispatchEvent(new Event("input", { bubbles: !0 }));
53
53
  }
54
54
  } catch (r) {
55
55
  console.error("Import failed:", r), alert("Failed to import Word document. Please check the console for details.");
56
56
  }
57
- }, o.click(), !0;
57
+ }, t.click(), !0;
58
58
  },
59
59
  exportWord: async () => {
60
- const d = () => {
61
- const o = window.getSelection();
62
- if (o && o.rangeCount > 0) {
63
- let t = o.getRangeAt(0).startContainer;
64
- for (; t && t !== document.body; ) {
65
- if (t.nodeType === Node.ELEMENT_NODE && t.getAttribute("contenteditable") === "true")
66
- return t;
67
- t = t.parentNode;
60
+ const l = () => {
61
+ const t = window.getSelection();
62
+ if (t && t.rangeCount > 0) {
63
+ let o = t.getRangeAt(0).startContainer;
64
+ for (; o && o !== document.body; ) {
65
+ if (o.nodeType === Node.ELEMENT_NODE && o.getAttribute("contenteditable") === "true")
66
+ return o;
67
+ o = o.parentNode;
68
68
  }
69
69
  }
70
70
  const e = document.activeElement;
71
71
  return (e == null ? void 0 : e.getAttribute("contenteditable")) === "true" ? e : (e == null ? void 0 : e.closest('[contenteditable="true"]')) || document.querySelector('[contenteditable="true"]');
72
72
  };
73
73
  try {
74
- const o = d();
75
- if (o) {
76
- const e = o.innerHTML, { exportToWord: n } = await import("./documentManager-irzj9n3V.mjs").then((t) => t.d);
74
+ const t = l();
75
+ if (t) {
76
+ const e = t.innerHTML, { exportToWord: n } = await import("./documentManager-vQ1VkbUY.mjs");
77
77
  await n(e, "document.docx");
78
78
  }
79
79
  return !0;
80
- } catch (o) {
81
- return console.error("Export failed:", o), alert("Failed to export to Word. Please check the console for details."), !1;
80
+ } catch (t) {
81
+ return console.error("Export failed:", t), alert("Failed to export to Word. Please check the console for details."), !1;
82
82
  }
83
83
  },
84
84
  exportPdf: async () => {
85
- const d = () => {
86
- const o = window.getSelection();
87
- if (o && o.rangeCount > 0) {
88
- let t = o.getRangeAt(0).startContainer;
89
- for (; t && t !== document.body; ) {
90
- if (t.nodeType === Node.ELEMENT_NODE && t.getAttribute("contenteditable") === "true")
91
- return t;
92
- t = t.parentNode;
85
+ const l = () => {
86
+ const t = window.getSelection();
87
+ if (t && t.rangeCount > 0) {
88
+ let o = t.getRangeAt(0).startContainer;
89
+ for (; o && o !== document.body; ) {
90
+ if (o.nodeType === Node.ELEMENT_NODE && o.getAttribute("contenteditable") === "true")
91
+ return o;
92
+ o = o.parentNode;
93
93
  }
94
94
  }
95
95
  const e = document.activeElement;
96
96
  return (e == null ? void 0 : e.getAttribute("contenteditable")) === "true" ? e : (e == null ? void 0 : e.closest('[contenteditable="true"]')) || document.querySelector('[contenteditable="true"]');
97
97
  };
98
98
  try {
99
- const o = d();
100
- if (o) {
101
- const e = o.innerHTML, { exportToPdf: n } = await import("./documentManager-irzj9n3V.mjs").then((t) => t.d);
102
- await n(e, "document.pdf", o);
99
+ const t = l();
100
+ if (t) {
101
+ const e = t.innerHTML, { exportToPdf: n } = await import("./documentManager-vQ1VkbUY.mjs");
102
+ await n(e, "document.pdf", t);
103
103
  } else
104
104
  console.error("PDF Export: No editor element found"), alert("No active editor found. Please click in the editor area first.");
105
105
  return !0;
106
- } catch (o) {
107
- return console.error("PDF Export: Export failed:", o), alert("Failed to export to PDF. Please check the console for details."), !1;
106
+ } catch (t) {
107
+ return console.error("PDF Export: Export failed:", t), alert("Failed to export to PDF. Please check the console for details."), !1;
108
108
  }
109
109
  }
110
110
  },
111
111
  keymap: {}
112
112
  });
113
113
  export {
114
- i as DocumentManagerPlugin
114
+ c as DocumentManagerPlugin
115
115
  };
116
- //# sourceMappingURL=DocumentManagerPlugin.native-BvZL5CSG.mjs.map
116
+ //# sourceMappingURL=DocumentManagerPlugin.native-C2cs_1w4.mjs.map
@@ -6,6 +6,7 @@ const D = [
6
6
  { label: "Responsive - 1x1", value: "1x1" }
7
7
  ], u = '[data-theme="dark"], .dark, .editora-theme-dark', h = /* @__PURE__ */ new WeakMap(), s = (e) => (h.has(e) || h.set(e, {
8
8
  dialogElement: null,
9
+ escapeHandler: null,
9
10
  activeTab: "general",
10
11
  formData: {
11
12
  src: "",
@@ -27,7 +28,7 @@ function q(e) {
27
28
  const t = document.activeElement;
28
29
  return t != null && t.closest(u) ? !0 : document.body.matches(u) || document.documentElement.matches(u);
29
30
  }
30
- const H = () => ({
31
+ const A = () => ({
31
32
  name: "embedIframe",
32
33
  toolbar: [
33
34
  {
@@ -39,16 +40,16 @@ const H = () => ({
39
40
  }
40
41
  ],
41
42
  commands: {
42
- openEmbedIframeDialog: (e) => (C(e), !0)
43
+ openEmbedIframeDialog: (e) => (L(e), !0)
43
44
  },
44
45
  keymap: {
45
46
  "Mod-Shift-e": "openEmbedIframeDialog"
46
47
  }
47
48
  });
48
- function C(e) {
49
+ function L(e) {
49
50
  if (!e) {
50
- const o = document.activeElement;
51
- o && o.closest("[data-editora-editor]") && (e = o.closest("[data-editora-editor]"));
51
+ const a = document.activeElement;
52
+ a && a.closest("[data-editora-editor]") && (e = a.closest("[data-editora-editor]"));
52
53
  }
53
54
  if (e || (e = document.querySelector("[data-editora-editor]")), !e) {
54
55
  console.warn("Editor element not found");
@@ -68,10 +69,10 @@ function C(e) {
68
69
  showBorder: !0,
69
70
  enableScrollbar: !0
70
71
  }, t.activeTab = "general";
71
- const a = document.createElement("div");
72
- a.className = "rte-dialog-overlay rte-embed-iframe-overlay", q(e) && a.classList.add("rte-theme-dark"), a.onclick = () => p(e);
72
+ const o = document.createElement("div");
73
+ o.className = "rte-dialog-overlay rte-embed-iframe-overlay", q(e) && o.classList.add("rte-theme-dark"), o.onclick = () => p(e);
73
74
  const r = document.createElement("div");
74
- r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (o) => o.stopPropagation(), r.innerHTML = `
75
+ r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (a) => a.stopPropagation(), r.innerHTML = `
75
76
  <div class="rte-dialog-header">
76
77
  <h3>Embed Iframe</h3>
77
78
  <button class="rte-dialog-close">×</button>
@@ -91,7 +92,7 @@ function C(e) {
91
92
  <div class="rte-form-group">
92
93
  <label class="rte-form-label">Size</label>
93
94
  <select class="rte-form-select" id="iframe-size">
94
- ${D.map((o) => `<option value="${o.value}">${o.label}</option>`).join("")}
95
+ ${D.map((a) => `<option value="${a.value}">${a.label}</option>`).join("")}
95
96
  </select>
96
97
  </div>
97
98
  <div class="rte-form-row" id="dimensions-row">
@@ -145,71 +146,73 @@ function C(e) {
145
146
  <button type="button" class="rte-btn rte-btn-secondary" id="cancel-btn">Cancel</button>
146
147
  <button type="submit" class="rte-btn rte-btn-primary" id="save-btn">Save</button>
147
148
  </div>
148
- `, a.appendChild(r), document.body.appendChild(a), t.dialogElement = a, L(r, e), A(), setTimeout(() => {
149
- var o;
150
- (o = r.querySelector("#iframe-src")) == null || o.focus();
149
+ `, o.appendChild(r), document.body.appendChild(o), t.dialogElement = o, t.escapeHandler = (a) => {
150
+ a.key === "Escape" && (a.preventDefault(), a.stopPropagation(), p(e));
151
+ }, document.addEventListener("keydown", t.escapeHandler, !0), $(r, e), T(), setTimeout(() => {
152
+ var a;
153
+ (a = r.querySelector("#iframe-src")) == null || a.focus();
151
154
  }, 100);
152
155
  }
153
- function L(e, t) {
156
+ function $(e, t) {
154
157
  var l, i, d, f;
155
158
  s(t), (l = e.querySelector(".rte-dialog-close")) == null || l.addEventListener("click", () => p(t)), e.querySelectorAll(".rte-tab-button").forEach((n) => {
156
159
  n.addEventListener("click", (m) => {
157
160
  const c = m.target.getAttribute("data-tab");
158
- c && $(e, c, t);
161
+ c && C(e, c, t);
159
162
  });
160
163
  });
161
- const a = e.querySelector("#iframe-size");
162
- a == null || a.addEventListener("change", (n) => z(e, n.target.value, t));
163
- const r = e.querySelector("#iframe-width"), o = e.querySelector("#iframe-height");
164
- r == null || r.addEventListener("input", (n) => I(e, n.target.value, t)), o == null || o.addEventListener("input", (n) => R(e, n.target.value, t)), (i = e.querySelector("#constrain-btn")) == null || i.addEventListener("click", () => E(e, t)), (d = e.querySelector("#cancel-btn")) == null || d.addEventListener("click", () => p(t)), (f = e.querySelector("#save-btn")) == null || f.addEventListener("click", () => P(e, t));
164
+ const o = e.querySelector("#iframe-size");
165
+ o == null || o.addEventListener("change", (n) => H(e, n.target.value, t));
166
+ const r = e.querySelector("#iframe-width"), a = e.querySelector("#iframe-height");
167
+ r == null || r.addEventListener("input", (n) => z(e, n.target.value, t)), a == null || a.addEventListener("input", (n) => E(e, n.target.value, t)), (i = e.querySelector("#constrain-btn")) == null || i.addEventListener("click", () => I(e, t)), (d = e.querySelector("#cancel-btn")) == null || d.addEventListener("click", () => p(t)), (f = e.querySelector("#save-btn")) == null || f.addEventListener("click", () => P(e, t));
165
168
  }
166
- function $(e, t, a) {
167
- const r = s(a);
168
- r.activeTab = t, e.querySelectorAll(".rte-tab-button").forEach((o) => {
169
- o.classList.toggle("active", o.getAttribute("data-tab") === t);
170
- }), e.querySelectorAll(".rte-tab-panel").forEach((o) => {
171
- o.style.display = o.getAttribute("data-panel") === t ? "block" : "none";
169
+ function C(e, t, o) {
170
+ const r = s(o);
171
+ r.activeTab = t, e.querySelectorAll(".rte-tab-button").forEach((a) => {
172
+ a.classList.toggle("active", a.getAttribute("data-tab") === t);
173
+ }), e.querySelectorAll(".rte-tab-panel").forEach((a) => {
174
+ a.style.display = a.getAttribute("data-panel") === t ? "block" : "none";
172
175
  });
173
176
  }
174
- function z(e, t, a) {
175
- const r = s(a);
177
+ function H(e, t, o) {
178
+ const r = s(o);
176
179
  r.formData.selectedSize = t;
177
- const o = e.querySelector("#dimensions-row"), l = e.querySelector("#iframe-width"), i = e.querySelector("#iframe-height");
178
- t === "inline" ? (o.style.display = "flex", l.value = "100%", i.value = "400px", r.formData.width = "100%", r.formData.height = "400px") : (o.style.display = "none", r.formData.width = "100%", r.formData.height = "auto");
180
+ const a = e.querySelector("#dimensions-row"), l = e.querySelector("#iframe-width"), i = e.querySelector("#iframe-height");
181
+ t === "inline" ? (a.style.display = "flex", l.value = "100%", i.value = "400px", r.formData.width = "100%", r.formData.height = "400px") : (a.style.display = "none", r.formData.width = "100%", r.formData.height = "auto");
179
182
  }
180
- function I(e, t, a) {
181
- const r = s(a);
183
+ function z(e, t, o) {
184
+ const r = s(o);
182
185
  if (r.formData.width = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
183
- const o = parseFloat(t);
184
- if (!isNaN(o)) {
185
- const l = o * 9 / 16;
186
+ const a = parseFloat(t);
187
+ if (!isNaN(a)) {
188
+ const l = a * 9 / 16;
186
189
  r.formData.height = `${l}px`;
187
190
  const i = e.querySelector("#iframe-height");
188
191
  i && (i.value = r.formData.height);
189
192
  }
190
193
  }
191
194
  }
192
- function R(e, t, a) {
193
- const r = s(a);
195
+ function E(e, t, o) {
196
+ const r = s(o);
194
197
  if (r.formData.height = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
195
- const o = parseFloat(t);
196
- if (!isNaN(o)) {
197
- const l = o * 16 / 9;
198
+ const a = parseFloat(t);
199
+ if (!isNaN(a)) {
200
+ const l = a * 16 / 9;
198
201
  r.formData.width = `${l}px`;
199
202
  const i = e.querySelector("#iframe-width");
200
203
  i && (i.value = r.formData.width);
201
204
  }
202
205
  }
203
206
  }
204
- function E(e, t) {
205
- const a = s(t);
206
- a.formData.constrainProportions = !a.formData.constrainProportions;
207
+ function I(e, t) {
208
+ const o = s(t);
209
+ o.formData.constrainProportions = !o.formData.constrainProportions;
207
210
  const r = e.querySelector("#constrain-btn");
208
- r && (r.textContent = a.formData.constrainProportions ? "🔒" : "🔓", r.className = `rte-constrain-btn ${a.formData.constrainProportions ? "locked" : "unlocked"}`, r.title = a.formData.constrainProportions ? "Unlock proportions" : "Lock proportions");
211
+ r && (r.textContent = o.formData.constrainProportions ? "🔒" : "🔓", r.className = `rte-constrain-btn ${o.formData.constrainProportions ? "locked" : "unlocked"}`, r.title = o.formData.constrainProportions ? "Unlock proportions" : "Lock proportions");
209
212
  }
210
213
  function P(e, t) {
211
214
  var c, b, g, v, x, y, k, w, S;
212
- const a = s(t), r = (c = e.querySelector("#iframe-src")) == null ? void 0 : c.value.trim();
215
+ const o = s(t), r = (c = e.querySelector("#iframe-src")) == null ? void 0 : c.value.trim();
213
216
  if (!r) {
214
217
  alert("Please enter a source URL");
215
218
  return;
@@ -218,25 +221,25 @@ function P(e, t) {
218
221
  alert("Please enter a valid URL starting with https:// or http://");
219
222
  return;
220
223
  }
221
- const o = (b = e.querySelector("#iframe-name")) == null ? void 0 : b.value.trim(), l = (g = e.querySelector("#iframe-title")) == null ? void 0 : g.value.trim(), i = (v = e.querySelector("#iframe-longdesc")) == null ? void 0 : v.value.trim();
224
+ const a = (b = e.querySelector("#iframe-name")) == null ? void 0 : b.value.trim(), l = (g = e.querySelector("#iframe-title")) == null ? void 0 : g.value.trim(), i = (v = e.querySelector("#iframe-longdesc")) == null ? void 0 : v.value.trim();
222
225
  (x = e.querySelector("#iframe-desc-url")) == null || x.value.trim();
223
226
  const d = (k = (y = e.querySelector("#iframe-border")) == null ? void 0 : y.checked) != null ? k : !0, f = (S = (w = e.querySelector("#iframe-scrollbar")) == null ? void 0 : w.checked) != null ? S : !0;
224
- let n = a.formData.width, m = a.formData.height;
225
- a.formData.selectedSize !== "inline" && (n = "100%", m = "auto"), T(t, {
227
+ let n = o.formData.width, m = o.formData.height;
228
+ o.formData.selectedSize !== "inline" && (n = "100%", m = "auto"), R(t, {
226
229
  src: r,
227
230
  width: n,
228
231
  height: m,
229
- aspectRatio: a.formData.selectedSize,
230
- name: o || void 0,
232
+ aspectRatio: o.formData.selectedSize,
233
+ name: a || void 0,
231
234
  title: l || void 0,
232
235
  longDescription: i || void 0,
233
236
  showBorder: d,
234
237
  enableScrollbar: f
235
238
  }), p(t);
236
239
  }
237
- function T(e, t) {
238
- const a = e.querySelector('[contenteditable="true"]');
239
- a && (a.focus(), setTimeout(() => {
240
+ function R(e, t) {
241
+ const o = e.querySelector('[contenteditable="true"]');
242
+ o && (o.focus(), setTimeout(() => {
240
243
  const r = [
241
244
  `src="${t.src}"`,
242
245
  `width="${t.width}"`,
@@ -246,9 +249,9 @@ function T(e, t) {
246
249
  `scrolling="${t.enableScrollbar ? "auto" : "no"}"`
247
250
  ];
248
251
  t.name && r.push(`name="${t.name}"`), t.title && r.push(`title="${t.title}"`), t.longDescription && r.push(`longdesc="${t.longDescription}"`);
249
- const o = [];
250
- t.aspectRatio !== "inline" && o.push(`rte-iframe-${t.aspectRatio}`);
251
- const l = o.length > 0 ? `class="${o.join(" ")}"` : "", i = `data-aspect-ratio="${t.aspectRatio}"`, d = `<iframe ${r.join(" ")} ${l} ${i}></iframe>`;
252
+ const a = [];
253
+ t.aspectRatio !== "inline" && a.push(`rte-iframe-${t.aspectRatio}`);
254
+ const l = a.length > 0 ? `class="${a.join(" ")}"` : "", i = `data-aspect-ratio="${t.aspectRatio}"`, d = `<iframe ${r.join(" ")} ${l} ${i}></iframe>`;
252
255
  if (!document.execCommand("insertHTML", !1, d)) {
253
256
  const n = window.getSelection();
254
257
  if (n && n.rangeCount > 0) {
@@ -266,9 +269,9 @@ function T(e, t) {
266
269
  }
267
270
  function p(e) {
268
271
  const t = s(e);
269
- t.dialogElement && (document.body.removeChild(t.dialogElement), t.dialogElement = null);
272
+ t.escapeHandler && (document.removeEventListener("keydown", t.escapeHandler, !0), t.escapeHandler = null), t.dialogElement && (t.dialogElement.remove(), t.dialogElement = null);
270
273
  }
271
- function A() {
274
+ function T() {
272
275
  if (document.getElementById("embed-iframe-dialog-styles")) return;
273
276
  const e = document.createElement("style");
274
277
  e.id = "embed-iframe-dialog-styles", e.textContent = `
@@ -560,6 +563,6 @@ function A() {
560
563
  `, document.head.appendChild(e);
561
564
  }
562
565
  export {
563
- H as EmbedIframePlugin
566
+ A as EmbedIframePlugin
564
567
  };
565
- //# sourceMappingURL=EmbedIframePlugin.native-CSWIB1jm.mjs.map
568
+ //# sourceMappingURL=EmbedIframePlugin.native-DKJx2OS7.mjs.map