@editora/core 1.0.7 → 1.0.9

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 (87) hide show
  1. package/README.md +5 -0
  2. package/dist/{A11yCheckerPlugin.native-BRdGYMju.mjs → A11yCheckerPlugin.native-58d12bed.mjs} +23 -12
  3. package/dist/{AnchorPlugin.native-BcYGEtd9.mjs → AnchorPlugin.native-289a112a.mjs} +112 -102
  4. package/dist/ApprovalWorkflowPlugin.native-449ce66c.mjs +1115 -0
  5. package/dist/{BackgroundColorPlugin.native-50iAT9xU.mjs → BackgroundColorPlugin.native-8aceb5cc.mjs} +16 -9
  6. package/dist/{BlockquotePlugin.native-JFmOLsxN.mjs → BlockquotePlugin.native-3541c714.mjs} +3 -2
  7. package/dist/BlocksLibraryPlugin.native-1cc51e63.mjs +1386 -0
  8. package/dist/{BoldPlugin.native-BAzzoqU5.mjs → BoldPlugin.native-f9d7f8e4.mjs} +1 -1
  9. package/dist/{CapitalizationPlugin.native-DOMsh5R7.mjs → CapitalizationPlugin.native-42c135dc.mjs} +3 -2
  10. package/dist/{ChecklistPlugin.native-nuSSEFNI.mjs → ChecklistPlugin.native-3b397ee9.mjs} +43 -22
  11. package/dist/CitationsPlugin.native-169fb1e8.mjs +1532 -0
  12. package/dist/{ClearFormattingPlugin.native-Bq_XcTh2.mjs → ClearFormattingPlugin.native-77baa514.mjs} +11 -6
  13. package/dist/{CodePlugin.native-DlpTPdkd.mjs → CodePlugin.native-989cf0aa.mjs} +629 -580
  14. package/dist/{CodeSamplePlugin.native-CgGoH-X4.mjs → CodeSamplePlugin.native-6cc0148e.mjs} +19 -10
  15. package/dist/{CommentsPlugin.native-DPSqTkiv.mjs → CommentsPlugin.native-03659874.mjs} +55 -28
  16. package/dist/ConditionalContentPlugin.native-4983143a.mjs +1424 -0
  17. package/dist/ContentRulesPlugin.native-63ed405b.mjs +1149 -0
  18. package/dist/DataBindingPlugin.native-427e9d75.mjs +956 -0
  19. package/dist/{DirectionPlugin.native-CDnbdNyl.mjs → DirectionPlugin.native-4e742f42.mjs} +19 -10
  20. package/dist/DocSchemaPlugin.native-8e41eda0.mjs +1382 -0
  21. package/dist/{DocumentManagerPlugin.native-C2cs_1w4.mjs → DocumentManagerPlugin.native-e69895ad.mjs} +4 -4
  22. package/dist/{EmbedIframePlugin.native-DKJx2OS7.mjs → EmbedIframePlugin.native-55209c87.mjs} +70 -70
  23. package/dist/{EmojisPlugin.native-CitxxlWX.mjs → EmojisPlugin.native-65c5ac47.mjs} +11 -6
  24. package/dist/{FontFamilyPlugin.native-j8hMTbg4.mjs → FontFamilyPlugin.native-f9bc255a.mjs} +7 -4
  25. package/dist/{FontSizePlugin.native-B_jCh7dY.mjs → FontSizePlugin.native-f5647872.mjs} +19 -10
  26. package/dist/{FootnotePlugin.native-D730OGRm.mjs → FootnotePlugin.native-494657b3.mjs} +77 -39
  27. package/dist/{FullscreenPlugin.native-ChXyxeNw.mjs → FullscreenPlugin.native-87ce92e9.mjs} +1 -1
  28. package/dist/{HeadingPlugin.native-DrLYwQnQ.mjs → HeadingPlugin.native-e38c4a16.mjs} +1 -1
  29. package/dist/{HistoryPlugin.native-TDnVMsEO.mjs → HistoryPlugin.native-92ed4be4.mjs} +43 -22
  30. package/dist/{IndentPlugin.native-BHixp8sP.mjs → IndentPlugin.native-e4ee902b.mjs} +23 -12
  31. package/dist/{ItalicPlugin.native-CQjjDyUL.mjs → ItalicPlugin.native-7c95cfbc.mjs} +1 -1
  32. package/dist/{LineHeightPlugin.native-CM7iXdQj.mjs → LineHeightPlugin.native-5668f78c.mjs} +19 -10
  33. package/dist/{LinkPlugin.native-DYCIcdTm.mjs → LinkPlugin.native-6df29111.mjs} +9 -5
  34. package/dist/{ListPlugin.native-V7EZC1lM.mjs → ListPlugin.native-fe2e115a.mjs} +9 -5
  35. package/dist/{MathPlugin.native-f_mDp8VL.mjs → MathPlugin.native-735bbac2.mjs} +9 -5
  36. package/dist/{MediaManagerPlugin.native-BiXiK8FC.mjs → MediaManagerPlugin.native-3cf48a00.mjs} +219 -207
  37. package/dist/MentionPlugin.native-3b1e8c05.mjs +778 -0
  38. package/dist/{MergeTagPlugin.native-C3eOfEgw.mjs → MergeTagPlugin.native-31cf7d48.mjs} +51 -26
  39. package/dist/PIIRedactionPlugin.native-7ab10b9f.mjs +1449 -0
  40. package/dist/{PageBreakPlugin.native-CXdX5fAv.mjs → PageBreakPlugin.native-1794c5fb.mjs} +67 -52
  41. package/dist/{PreviewPlugin.native-DBvfpmIv.mjs → PreviewPlugin.native-f7b67cc0.mjs} +38 -33
  42. package/dist/{PrintPlugin.native-7qt5v7L5.mjs → PrintPlugin.native-f6a168c2.mjs} +5 -3
  43. package/dist/SlashCommandsPlugin.native-8d45e511.mjs +790 -0
  44. package/dist/SmartPastePlugin.native-a6c5efec.mjs +1447 -0
  45. package/dist/{SpecialCharactersPlugin.native-CZDato89.mjs → SpecialCharactersPlugin.native-7f06d4ba.mjs} +17 -9
  46. package/dist/{SpellCheckPlugin.native-BZB9AewP.mjs → SpellCheckPlugin.native-04e20834.mjs} +41 -21
  47. package/dist/{StrikethroughPlugin.native-0Be7j49s.mjs → StrikethroughPlugin.native-905e9501.mjs} +9 -5
  48. package/dist/{TablePlugin.native-DrHX-efe.mjs → TablePlugin.native-7d5458c1.mjs} +58 -30
  49. package/dist/{TemplatePlugin.native-CrpfKRJ8.mjs → TemplatePlugin.native-580f0f63.mjs} +32 -17
  50. package/dist/{TextAlignmentPlugin.native-sM_1s00t.mjs → TextAlignmentPlugin.native-9357b3ed.mjs} +11 -6
  51. package/dist/{TextColorPlugin.native-Bwl_bSmc.mjs → TextColorPlugin.native-d53ed459.mjs} +26 -14
  52. package/dist/TrackChangesPlugin.native-e96da509.mjs +818 -0
  53. package/dist/TranslationWorkflowPlugin.native-4e711b1e.mjs +1797 -0
  54. package/dist/{UnderlinePlugin.native-QpIcK4L2.mjs → UnderlinePlugin.native-8080c998.mjs} +1 -1
  55. package/dist/VersionDiffPlugin.native-5bbeff85.mjs +801 -0
  56. package/dist/_commonjsHelpers-69d58be2.mjs +31 -0
  57. package/dist/{anchoredPopover-Bxds0VoB.mjs → anchoredPopover-5cca53ba.mjs} +1 -1
  58. package/dist/documentManager-8327fb6e.mjs +9166 -0
  59. package/dist/{editorContainerHelpers-C7kdWnS0.mjs → editorContainerHelpers-69585c07.mjs} +3 -2
  60. package/dist/editora.min.js +14 -13
  61. package/dist/editora.umd.js +14 -13
  62. package/dist/{html2canvas.esm-AYkPY5LS.mjs → html2canvas.esm-c51cb3b9.mjs} +978 -894
  63. package/dist/index-072ef022.js +11 -0
  64. package/dist/index-49d31221.mjs +16860 -0
  65. package/dist/{index-yzU4NdPT.mjs → index-7da30697.mjs} +490 -358
  66. package/dist/index.cjs.js +1 -1
  67. package/dist/index.es-b47a189f.mjs +5782 -0
  68. package/dist/index.esm.js +12 -7
  69. package/dist/{jspdf.es.min-BJGtOnRT.mjs → jspdf.es.min-780c82db.mjs} +4808 -3784
  70. package/dist/plugin-loader.js +77 -40
  71. package/dist/{purify.es-CKpwg8Tk.mjs → purify.es-3bdbcfc5.mjs} +20 -10
  72. package/dist/style.css +1 -0
  73. package/dist/webcomponent-core.js +546 -414
  74. package/dist/webcomponent-core.min.css +1 -1
  75. package/dist/webcomponent-core.min.js +40 -39
  76. package/dist/webcomponent.cjs.js +1 -1
  77. package/dist/webcomponent.esm.js +1 -1
  78. package/dist/webcomponent.js +484 -315
  79. package/dist/webcomponent.min.css +1 -1
  80. package/dist/webcomponent.min.js +6035 -558
  81. package/package.json +11 -5
  82. package/dist/_commonjsHelpers-DOllISpa.mjs +0 -32
  83. package/dist/core.css +0 -1
  84. package/dist/documentManager-vQ1VkbUY.mjs +0 -8418
  85. package/dist/index-BpE6GFbz.js +0 -10
  86. package/dist/index-BslAFzmv.mjs +0 -16544
  87. package/dist/index.es-BYD2KEo6.mjs +0 -6666
@@ -48,7 +48,7 @@ const c = () => ({
48
48
  try {
49
49
  const r = l();
50
50
  if (r) {
51
- const { importFromWord: d } = await import("./documentManager-vQ1VkbUY.mjs"), a = await d(n);
51
+ const { importFromWord: d } = await import("./documentManager-8327fb6e.mjs"), a = await d(n);
52
52
  r.innerHTML = a, r.dispatchEvent(new Event("input", { bubbles: !0 }));
53
53
  }
54
54
  } catch (r) {
@@ -73,7 +73,7 @@ const c = () => ({
73
73
  try {
74
74
  const t = l();
75
75
  if (t) {
76
- const e = t.innerHTML, { exportToWord: n } = await import("./documentManager-vQ1VkbUY.mjs");
76
+ const e = t.innerHTML, { exportToWord: n } = await import("./documentManager-8327fb6e.mjs");
77
77
  await n(e, "document.docx");
78
78
  }
79
79
  return !0;
@@ -98,7 +98,7 @@ const c = () => ({
98
98
  try {
99
99
  const t = l();
100
100
  if (t) {
101
- const e = t.innerHTML, { exportToPdf: n } = await import("./documentManager-vQ1VkbUY.mjs");
101
+ const e = t.innerHTML, { exportToPdf: n } = await import("./documentManager-8327fb6e.mjs");
102
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.");
@@ -113,4 +113,4 @@ const c = () => ({
113
113
  export {
114
114
  c as DocumentManagerPlugin
115
115
  };
116
- //# sourceMappingURL=DocumentManagerPlugin.native-C2cs_1w4.mjs.map
116
+ //# sourceMappingURL=DocumentManagerPlugin.native-e69895ad.mjs.map
@@ -1,4 +1,4 @@
1
- const D = [
1
+ const q = [
2
2
  { label: "Inline Value", value: "inline" },
3
3
  { label: "Responsive - 21x9", value: "21x9" },
4
4
  { label: "Responsive - 16x9", value: "16x9" },
@@ -22,13 +22,13 @@ const D = [
22
22
  enableScrollbar: !0
23
23
  }
24
24
  }), h.get(e));
25
- function q(e) {
25
+ function L(e) {
26
26
  if (e != null && e.matches(u) || e != null && e.closest(u))
27
27
  return !0;
28
28
  const t = document.activeElement;
29
29
  return t != null && t.closest(u) ? !0 : document.body.matches(u) || document.documentElement.matches(u);
30
30
  }
31
- const A = () => ({
31
+ const N = () => ({
32
32
  name: "embedIframe",
33
33
  toolbar: [
34
34
  {
@@ -40,16 +40,16 @@ const A = () => ({
40
40
  }
41
41
  ],
42
42
  commands: {
43
- openEmbedIframeDialog: (e) => (L(e), !0)
43
+ openEmbedIframeDialog: (e) => ($(e), !0)
44
44
  },
45
45
  keymap: {
46
46
  "Mod-Shift-e": "openEmbedIframeDialog"
47
47
  }
48
48
  });
49
- function L(e) {
49
+ function $(e) {
50
50
  if (!e) {
51
- const a = document.activeElement;
52
- a && a.closest("[data-editora-editor]") && (e = a.closest("[data-editora-editor]"));
51
+ const o = document.activeElement;
52
+ o && o.closest("[data-editora-editor]") && (e = o.closest("[data-editora-editor]"));
53
53
  }
54
54
  if (e || (e = document.querySelector("[data-editora-editor]")), !e) {
55
55
  console.warn("Editor element not found");
@@ -69,10 +69,10 @@ function L(e) {
69
69
  showBorder: !0,
70
70
  enableScrollbar: !0
71
71
  }, t.activeTab = "general";
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);
72
+ const a = document.createElement("div");
73
+ a.className = "rte-dialog-overlay rte-embed-iframe-overlay", L(e) && a.classList.add("rte-theme-dark"), a.onclick = () => p(e);
74
74
  const r = document.createElement("div");
75
- r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (a) => a.stopPropagation(), r.innerHTML = `
75
+ r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (o) => o.stopPropagation(), r.innerHTML = `
76
76
  <div class="rte-dialog-header">
77
77
  <h3>Embed Iframe</h3>
78
78
  <button class="rte-dialog-close">×</button>
@@ -92,7 +92,7 @@ function L(e) {
92
92
  <div class="rte-form-group">
93
93
  <label class="rte-form-label">Size</label>
94
94
  <select class="rte-form-select" id="iframe-size">
95
- ${D.map((a) => `<option value="${a.value}">${a.label}</option>`).join("")}
95
+ ${q.map((o) => `<option value="${o.value}">${o.label}</option>`).join("")}
96
96
  </select>
97
97
  </div>
98
98
  <div class="rte-form-row" id="dimensions-row">
@@ -146,73 +146,73 @@ function L(e) {
146
146
  <button type="button" class="rte-btn rte-btn-secondary" id="cancel-btn">Cancel</button>
147
147
  <button type="submit" class="rte-btn rte-btn-primary" id="save-btn">Save</button>
148
148
  </div>
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();
149
+ `, a.appendChild(r), document.body.appendChild(a), t.dialogElement = a, t.escapeHandler = (o) => {
150
+ o.key === "Escape" && (o.preventDefault(), o.stopPropagation(), p(e));
151
+ }, document.addEventListener("keydown", t.escapeHandler, !0), C(r, e), A(), setTimeout(() => {
152
+ var o;
153
+ (o = r.querySelector("#iframe-src")) == null || o.focus();
154
154
  }, 100);
155
155
  }
156
- function $(e, t) {
156
+ function C(e, t) {
157
157
  var l, i, d, f;
158
158
  s(t), (l = e.querySelector(".rte-dialog-close")) == null || l.addEventListener("click", () => p(t)), e.querySelectorAll(".rte-tab-button").forEach((n) => {
159
159
  n.addEventListener("click", (m) => {
160
160
  const c = m.target.getAttribute("data-tab");
161
- c && C(e, c, t);
161
+ c && H(e, c, t);
162
162
  });
163
163
  });
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));
164
+ const a = e.querySelector("#iframe-size");
165
+ a == null || a.addEventListener("change", (n) => z(e, n.target.value, t));
166
+ const r = e.querySelector("#iframe-width"), o = e.querySelector("#iframe-height");
167
+ r == null || r.addEventListener("input", (n) => E(e, n.target.value, t)), o == null || o.addEventListener("input", (n) => I(e, n.target.value, t)), (i = e.querySelector("#constrain-btn")) == null || i.addEventListener("click", () => P(e, t)), (d = e.querySelector("#cancel-btn")) == null || d.addEventListener("click", () => p(t)), (f = e.querySelector("#save-btn")) == null || f.addEventListener("click", () => R(e, t));
168
168
  }
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";
169
+ function H(e, t, a) {
170
+ const r = s(a);
171
+ r.activeTab = t, e.querySelectorAll(".rte-tab-button").forEach((o) => {
172
+ o.classList.toggle("active", o.getAttribute("data-tab") === t);
173
+ }), e.querySelectorAll(".rte-tab-panel").forEach((o) => {
174
+ o.style.display = o.getAttribute("data-panel") === t ? "block" : "none";
175
175
  });
176
176
  }
177
- function H(e, t, o) {
178
- const r = s(o);
177
+ function z(e, t, a) {
178
+ const r = s(a);
179
179
  r.formData.selectedSize = t;
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");
180
+ const o = e.querySelector("#dimensions-row"), l = e.querySelector("#iframe-width"), i = e.querySelector("#iframe-height");
181
+ 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");
182
182
  }
183
- function z(e, t, o) {
184
- const r = s(o);
183
+ function E(e, t, a) {
184
+ const r = s(a);
185
185
  if (r.formData.width = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
186
- const a = parseFloat(t);
187
- if (!isNaN(a)) {
188
- const l = a * 9 / 16;
186
+ const o = parseFloat(t);
187
+ if (!isNaN(o)) {
188
+ const l = o * 9 / 16;
189
189
  r.formData.height = `${l}px`;
190
190
  const i = e.querySelector("#iframe-height");
191
191
  i && (i.value = r.formData.height);
192
192
  }
193
193
  }
194
194
  }
195
- function E(e, t, o) {
196
- const r = s(o);
195
+ function I(e, t, a) {
196
+ const r = s(a);
197
197
  if (r.formData.height = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
198
- const a = parseFloat(t);
199
- if (!isNaN(a)) {
200
- const l = a * 16 / 9;
198
+ const o = parseFloat(t);
199
+ if (!isNaN(o)) {
200
+ const l = o * 16 / 9;
201
201
  r.formData.width = `${l}px`;
202
202
  const i = e.querySelector("#iframe-width");
203
203
  i && (i.value = r.formData.width);
204
204
  }
205
205
  }
206
206
  }
207
- function I(e, t) {
208
- const o = s(t);
209
- o.formData.constrainProportions = !o.formData.constrainProportions;
207
+ function P(e, t) {
208
+ const a = s(t);
209
+ a.formData.constrainProportions = !a.formData.constrainProportions;
210
210
  const r = e.querySelector("#constrain-btn");
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");
211
+ 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");
212
212
  }
213
- function P(e, t) {
214
- var c, b, g, v, x, y, k, w, S;
215
- const o = s(t), r = (c = e.querySelector("#iframe-src")) == null ? void 0 : c.value.trim();
213
+ function R(e, t) {
214
+ var b, g, v, x, y, k, w, S, D;
215
+ const a = s(t), r = (b = e.querySelector("#iframe-src")) == null ? void 0 : b.value.trim();
216
216
  if (!r) {
217
217
  alert("Please enter a source URL");
218
218
  return;
@@ -221,25 +221,24 @@ function P(e, t) {
221
221
  alert("Please enter a valid URL starting with https:// or http://");
222
222
  return;
223
223
  }
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();
225
- (x = e.querySelector("#iframe-desc-url")) == null || x.value.trim();
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;
227
- let n = o.formData.width, m = o.formData.height;
228
- o.formData.selectedSize !== "inline" && (n = "100%", m = "auto"), R(t, {
224
+ const o = (g = e.querySelector("#iframe-name")) == null ? void 0 : g.value.trim(), l = (v = e.querySelector("#iframe-title")) == null ? void 0 : v.value.trim(), i = (x = e.querySelector("#iframe-longdesc")) == null ? void 0 : x.value.trim(), d = (y = e.querySelector("#iframe-desc-url")) == null ? void 0 : y.value.trim(), f = (w = (k = e.querySelector("#iframe-border")) == null ? void 0 : k.checked) != null ? w : !0, n = (D = (S = e.querySelector("#iframe-scrollbar")) == null ? void 0 : S.checked) != null ? D : !0;
225
+ let m = a.formData.width, c = a.formData.height;
226
+ a.formData.selectedSize !== "inline" && (m = "100%", c = "auto"), T(t, {
229
227
  src: r,
230
- width: n,
231
- height: m,
232
- aspectRatio: o.formData.selectedSize,
233
- name: a || void 0,
228
+ width: m,
229
+ height: c,
230
+ aspectRatio: a.formData.selectedSize,
231
+ name: o || void 0,
234
232
  title: l || void 0,
235
233
  longDescription: i || void 0,
236
- showBorder: d,
237
- enableScrollbar: f
234
+ descriptionUrl: d || void 0,
235
+ showBorder: f,
236
+ enableScrollbar: n
238
237
  }), p(t);
239
238
  }
240
- function R(e, t) {
241
- const o = e.querySelector('[contenteditable="true"]');
242
- o && (o.focus(), setTimeout(() => {
239
+ function T(e, t) {
240
+ const a = e.querySelector('[contenteditable="true"]');
241
+ a && (a.focus(), setTimeout(() => {
243
242
  const r = [
244
243
  `src="${t.src}"`,
245
244
  `width="${t.width}"`,
@@ -249,9 +248,9 @@ function R(e, t) {
249
248
  `scrolling="${t.enableScrollbar ? "auto" : "no"}"`
250
249
  ];
251
250
  t.name && r.push(`name="${t.name}"`), t.title && r.push(`title="${t.title}"`), t.longDescription && r.push(`longdesc="${t.longDescription}"`);
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>`;
251
+ const o = [];
252
+ t.aspectRatio !== "inline" && o.push(`rte-iframe-${t.aspectRatio}`);
253
+ const l = o.length > 0 ? `class="${o.join(" ")}"` : "", i = `data-aspect-ratio="${t.aspectRatio}"`, d = `<iframe ${r.join(" ")} ${l} ${i}></iframe>`;
255
254
  if (!document.execCommand("insertHTML", !1, d)) {
256
255
  const n = window.getSelection();
257
256
  if (n && n.rangeCount > 0) {
@@ -271,8 +270,9 @@ function p(e) {
271
270
  const t = s(e);
272
271
  t.escapeHandler && (document.removeEventListener("keydown", t.escapeHandler, !0), t.escapeHandler = null), t.dialogElement && (t.dialogElement.remove(), t.dialogElement = null);
273
272
  }
274
- function T() {
275
- if (document.getElementById("embed-iframe-dialog-styles")) return;
273
+ function A() {
274
+ if (document.getElementById("embed-iframe-dialog-styles"))
275
+ return;
276
276
  const e = document.createElement("style");
277
277
  e.id = "embed-iframe-dialog-styles", e.textContent = `
278
278
  /* Embed Iframe Dialog Styles */
@@ -563,6 +563,6 @@ function T() {
563
563
  `, document.head.appendChild(e);
564
564
  }
565
565
  export {
566
- A as EmbedIframePlugin
566
+ N as EmbedIframePlugin
567
567
  };
568
- //# sourceMappingURL=EmbedIframePlugin.native-DKJx2OS7.mjs.map
568
+ //# sourceMappingURL=EmbedIframePlugin.native-55209c87.mjs.map
@@ -706,9 +706,11 @@ const y = '[data-theme="dark"], .dark, .editora-theme-dark', C = () => ({
706
706
  return e ? (E(e), !0) : !1;
707
707
  },
708
708
  insertEmoji: (r, t) => {
709
- if (!r) return !1;
709
+ if (!r)
710
+ return !1;
710
711
  const e = (t == null ? void 0 : t.contentElement) || b();
711
- if (!e) return !1;
712
+ if (!e)
713
+ return !1;
712
714
  try {
713
715
  return k(r, e), !0;
714
716
  } catch (o) {
@@ -785,7 +787,8 @@ function z(r, t) {
785
787
  o == null || o.addEventListener("click", (i) => {
786
788
  var j;
787
789
  const c = i.target.closest(".emojis-item");
788
- if (!c) return;
790
+ if (!c)
791
+ return;
789
792
  const h = c.getAttribute("data-emoji") || ((j = c.textContent) == null ? void 0 : j.trim()) || "";
790
793
  h && (k(h, t), m());
791
794
  });
@@ -828,7 +831,8 @@ function b() {
828
831
  const r = window.getSelection();
829
832
  if (r && r.rangeCount > 0) {
830
833
  const e = r.anchorNode, o = e instanceof HTMLElement ? e : e == null ? void 0 : e.parentElement, a = o == null ? void 0 : o.closest(".editora-content, .rte-content");
831
- if (a) return a;
834
+ if (a)
835
+ return a;
832
836
  }
833
837
  const t = document.activeElement;
834
838
  return t && (t.classList.contains("editora-content") || t.classList.contains("rte-content")) ? t : document.querySelector(".editora-content, .rte-content");
@@ -838,7 +842,8 @@ function A(r) {
838
842
  return t ? !!t.closest(y) : !1;
839
843
  }
840
844
  function L() {
841
- if (document.getElementById("emojis-dialog-styles")) return;
845
+ if (document.getElementById("emojis-dialog-styles"))
846
+ return;
842
847
  const r = document.createElement("style");
843
848
  r.id = "emojis-dialog-styles", r.textContent = `
844
849
  .emojis-overlay {
@@ -1114,4 +1119,4 @@ function L() {
1114
1119
  export {
1115
1120
  C as EmojisPlugin
1116
1121
  };
1117
- //# sourceMappingURL=EmojisPlugin.native-CitxxlWX.mjs.map
1122
+ //# sourceMappingURL=EmojisPlugin.native-65c5ac47.mjs.map
@@ -47,7 +47,8 @@ const E = () => ({
47
47
  ],
48
48
  commands: {
49
49
  setFontFamily: (e) => {
50
- if (!e) return !1;
50
+ if (!e)
51
+ return !1;
51
52
  try {
52
53
  return C(e), !0;
53
54
  } catch (t) {
@@ -100,7 +101,8 @@ function A(e, t, n) {
100
101
  }
101
102
  function C(e) {
102
103
  const t = window.getSelection();
103
- if (!t || t.rangeCount === 0) return;
104
+ if (!t || t.rangeCount === 0)
105
+ return;
104
106
  const n = t.getRangeAt(0), r = n.cloneRange(), a = h(n.commonAncestorContainer);
105
107
  if (n.collapsed)
106
108
  return;
@@ -111,7 +113,8 @@ function C(e) {
111
113
  o.selectNodeContents(s), t.removeAllRanges(), t.addRange(o), f(a);
112
114
  return;
113
115
  }
114
- if (!a) return;
116
+ if (!a)
117
+ return;
115
118
  const m = new Set(
116
119
  Array.from(a.querySelectorAll("font[face]"))
117
120
  ), u = new Set(
@@ -155,4 +158,4 @@ function F(e, t) {
155
158
  export {
156
159
  E as FontFamilyPlugin
157
160
  };
158
- //# sourceMappingURL=FontFamilyPlugin.native-j8hMTbg4.mjs.map
161
+ //# sourceMappingURL=FontFamilyPlugin.native-f9bc255a.mjs.map
@@ -71,10 +71,12 @@ const O = () => ({
71
71
  },
72
72
  setFontSize: (e) => {
73
73
  var o;
74
- if (!e) return !1;
74
+ if (!e)
75
+ return !1;
75
76
  try {
76
77
  const n = e.trim().match(/^(\d+(?:\.\d+)?)(px|em|rem)?$/i);
77
- if (!n) return !1;
78
+ if (!n)
79
+ return !1;
78
80
  const i = parseFloat(n[1]), r = ((o = n[2]) == null ? void 0 : o.toLowerCase()) || "px";
79
81
  return r === "px" && (i < 8 || i > 72) || (r === "em" || r === "rem") && (i < 0.5 || i > 5) ? !1 : (C(i, r), !0);
80
82
  } catch (t) {
@@ -132,7 +134,8 @@ function E(e, o, t, n) {
132
134
  const i = Array.from(
133
135
  e.querySelectorAll("font[size], [style*='font-size']")
134
136
  ), r = (s) => {
135
- if (!n || !s.isConnected) return !1;
137
+ if (!n || !s.isConnected)
138
+ return !1;
136
139
  try {
137
140
  if (typeof n.intersectsNode == "function")
138
141
  return n.intersectsNode(s);
@@ -174,7 +177,8 @@ function T(e, o, t) {
174
177
  }
175
178
  function y(e) {
176
179
  const o = window.getSelection();
177
- if (!o || o.rangeCount === 0) return;
180
+ if (!o || o.rangeCount === 0)
181
+ return;
178
182
  const { value: t, unit: n } = h();
179
183
  let i = e;
180
184
  (n === "em" || n === "rem") && (i = e * 0.125);
@@ -202,7 +206,8 @@ function h() {
202
206
  }
203
207
  function C(e, o = "px") {
204
208
  const t = window.getSelection();
205
- if (!t || t.rangeCount === 0) return;
209
+ if (!t || t.rangeCount === 0)
210
+ return;
206
211
  const n = t.getRangeAt(0), i = n.cloneRange(), r = x(n.commonAncestorContainer);
207
212
  if (n.collapsed)
208
213
  return;
@@ -213,7 +218,8 @@ function C(e, o = "px") {
213
218
  m.selectNodeContents(a), t.removeAllRanges(), t.addRange(m);
214
219
  return;
215
220
  }
216
- if (!r) return;
221
+ if (!r)
222
+ return;
217
223
  const l = new Set(
218
224
  Array.from(
219
225
  r.querySelectorAll("font[size], [style*='font-size']")
@@ -256,7 +262,8 @@ function v(e, o) {
256
262
  function z() {
257
263
  setTimeout(() => {
258
264
  const { value: e, unit: o } = h(), t = window.getSelection();
259
- if (!t || t.rangeCount === 0) return;
265
+ if (!t || t.rangeCount === 0)
266
+ return;
260
267
  let n = null, r = t.getRangeAt(0).startContainer;
261
268
  for (; r; ) {
262
269
  if (r instanceof HTMLElement && (r.classList.contains("rte-editor") || r.classList.contains("editora-editor") || r.hasAttribute("data-editora-editor"))) {
@@ -265,7 +272,8 @@ function z() {
265
272
  }
266
273
  r = r.parentNode;
267
274
  }
268
- if (!n) return;
275
+ if (!n)
276
+ return;
269
277
  const c = n.querySelector(
270
278
  ".rte-toolbar-wrapper, .editora-toolbar-container"
271
279
  ) || n, s = Array.from(
@@ -273,7 +281,8 @@ function z() {
273
281
  'input[data-command="setFontSize"], input.editora-toolbar-input.font-size, input.rte-toolbar-input.font-size, input[title="Font Size"]'
274
282
  )
275
283
  );
276
- if (s.length === 0) return;
284
+ if (s.length === 0)
285
+ return;
277
286
  const l = `${e % 1 === 0 ? e.toString() : e.toFixed(2).replace(/\.?0+$/, "")}${o}`;
278
287
  s.forEach((u) => {
279
288
  u.value = l;
@@ -283,4 +292,4 @@ function z() {
283
292
  export {
284
293
  O as FontSizePlugin
285
294
  };
286
- //# sourceMappingURL=FontSizePlugin.native-B_jCh7dY.mjs.map
295
+ //# sourceMappingURL=FontSizePlugin.native-f5647872.mjs.map