@editora/core 1.0.8 → 1.0.10

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 (58) hide show
  1. package/README.md +6 -1
  2. package/dist/{ApprovalWorkflowPlugin.native-C3jtAYjG.mjs → ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs} +136 -133
  3. package/dist/BlockquotePlugin.native-57_Xcjl1.mjs +212 -0
  4. package/dist/{BlocksLibraryPlugin.native-HMWKxWNs.mjs → BlocksLibraryPlugin.native-5sdsXsiE.mjs} +90 -87
  5. package/dist/{BoldPlugin.native-BAzzoqU5.mjs → BoldPlugin.native-CSh_LiIJ.mjs} +11 -7
  6. package/dist/CapitalizationPlugin.native-DLV4oPmB.mjs +159 -0
  7. package/dist/ChecklistPlugin.native-BS-kMz9O.mjs +371 -0
  8. package/dist/{CitationsPlugin.native-BnU0qCwR.mjs → CitationsPlugin.native-DQgoCd1B.mjs} +132 -129
  9. package/dist/ClearFormattingPlugin.native-DIS6AN2t.mjs +172 -0
  10. package/dist/CodePlugin.native-C5l1IeSS.mjs +4570 -0
  11. package/dist/{ContentRulesPlugin.native-nBLQ8QFZ.mjs → ContentRulesPlugin.native-vPx5nC73.mjs} +105 -102
  12. package/dist/{DataBindingPlugin.native-jQ1JPRTp.mjs → DataBindingPlugin.native-BoXwghTz.mjs} +49 -46
  13. package/dist/DirectionPlugin.native-Bl-QLFzO.mjs +153 -0
  14. package/dist/{DocSchemaPlugin.native-CHOge18O.mjs → DocSchemaPlugin.native-DUSVRHqT.mjs} +55 -52
  15. package/dist/{EmbedIframePlugin.native-DKJx2OS7.mjs → EmbedIframePlugin.native-BF_-LjTq.mjs} +287 -115
  16. package/dist/HeadingPlugin.native-DZdvubrQ.mjs +249 -0
  17. package/dist/{HistoryPlugin.native-TDnVMsEO.mjs → HistoryPlugin.native-D2wl32jV.mjs} +88 -103
  18. package/dist/{ItalicPlugin.native-CQjjDyUL.mjs → ItalicPlugin.native-CmnlwFHB.mjs} +15 -11
  19. package/dist/MathPlugin.native-NwWPHVmj.mjs +369 -0
  20. package/dist/{MediaManagerPlugin.native-BiXiK8FC.mjs → MediaManagerPlugin.native-eOsTJFpw.mjs} +204 -202
  21. package/dist/MergeTagPlugin.native-BzRVoD9-.mjs +580 -0
  22. package/dist/{PIIRedactionPlugin.native-DcsjmtV1.mjs → PIIRedactionPlugin.native-g7j4jOmm.mjs} +158 -155
  23. package/dist/{SlashCommandsPlugin.native-CmxvMEaE.mjs → SlashCommandsPlugin.native-BiN6ODw5.mjs} +2 -2
  24. package/dist/{SmartPastePlugin.native-BOKKtF07.mjs → SmartPastePlugin.native-CZAEHkyt.mjs} +127 -124
  25. package/dist/{SpecialCharactersPlugin.native-CZDato89.mjs → SpecialCharactersPlugin.native-DaG4b19I.mjs} +100 -76
  26. package/dist/{StrikethroughPlugin.native-0Be7j49s.mjs → StrikethroughPlugin.native-V0TL4F48.mjs} +12 -26
  27. package/dist/TemplatePlugin.native-DLjFUaPW.mjs +1150 -0
  28. package/dist/{TranslationWorkflowPlugin.native-Bz6jDGvj.mjs → TranslationWorkflowPlugin.native-DdF16tgT.mjs} +104 -101
  29. package/dist/{UnderlinePlugin.native-QpIcK4L2.mjs → UnderlinePlugin.native-DZzg23rv.mjs} +8 -4
  30. package/dist/editora.min.js +1 -1
  31. package/dist/editora.umd.js +1 -1
  32. package/dist/index-CPMGUZfB.js +10 -0
  33. package/dist/{index-DqC57IEH.mjs → index-DBoj6QfW.mjs} +17 -15
  34. package/dist/index.cjs.js +1 -1
  35. package/dist/index.esm.js +2 -2
  36. package/dist/inlineFormatting-DJ0-NZtx.mjs +97 -0
  37. package/dist/plugin-loader.js +37 -37
  38. package/dist/webcomponent-core.js +18 -16
  39. package/dist/webcomponent-core.min.css +1 -1
  40. package/dist/webcomponent-core.min.js +139 -62
  41. package/dist/webcomponent.cjs.js +1 -1
  42. package/dist/webcomponent.esm.js +1 -1
  43. package/dist/webcomponent.js +50 -48
  44. package/dist/webcomponent.min.css +1 -1
  45. package/dist/webcomponent.min.js +1174 -1071
  46. package/package.json +11 -5
  47. package/LICENSE +0 -21
  48. package/dist/BlockquotePlugin.native-JFmOLsxN.mjs +0 -48
  49. package/dist/CapitalizationPlugin.native-DOMsh5R7.mjs +0 -79
  50. package/dist/ChecklistPlugin.native-nuSSEFNI.mjs +0 -309
  51. package/dist/ClearFormattingPlugin.native-Bq_XcTh2.mjs +0 -140
  52. package/dist/CodePlugin.native-DlpTPdkd.mjs +0 -2691
  53. package/dist/DirectionPlugin.native-CDnbdNyl.mjs +0 -130
  54. package/dist/HeadingPlugin.native-DrLYwQnQ.mjs +0 -64
  55. package/dist/MathPlugin.native-f_mDp8VL.mjs +0 -292
  56. package/dist/MergeTagPlugin.native-C3eOfEgw.mjs +0 -559
  57. package/dist/TemplatePlugin.native-CrpfKRJ8.mjs +0 -602
  58. package/dist/index-D1LOqg5C.js +0 -10
@@ -1300,7 +1300,7 @@ E.EDITOR_DEFAULTS = {
1300
1300
  },
1301
1301
  statusbar: !1
1302
1302
  };
1303
- let w = E;
1303
+ let x = E;
1304
1304
  class K {
1305
1305
  constructor() {
1306
1306
  this.loadedPlugins = /* @__PURE__ */ new Map(), this.pluginRegistry = /* @__PURE__ */ new Map();
@@ -1399,6 +1399,7 @@ const q = [
1399
1399
  "img",
1400
1400
  "video",
1401
1401
  "audio",
1402
+ "iframe",
1402
1403
  "table",
1403
1404
  "thead",
1404
1405
  "tbody",
@@ -1415,16 +1416,17 @@ const q = [
1415
1416
  "sub",
1416
1417
  "hr"
1417
1418
  ], V = {
1418
- "*": ["class", "style", "id", "data-*", "role", "aria-*", "tabindex", "contenteditable", "spellcheck"],
1419
+ "*": ["class", "style", "id", "data-*", "role", "aria-*", "tabindex", "contenteditable", "spellcheck", "dir", "lang"],
1419
1420
  a: ["href", "target", "rel", "title"],
1420
1421
  img: ["src", "alt", "width", "height", "loading"],
1421
1422
  video: ["src", "controls", "width", "height", "autoplay", "loop", "muted"],
1422
1423
  audio: ["src", "controls", "autoplay", "loop", "muted"],
1424
+ iframe: ["src", "width", "height", "name", "title", "longdesc", "allow", "allowfullscreen", "frameborder", "scrolling", "loading", "referrerpolicy"],
1423
1425
  table: ["border", "cellpadding", "cellspacing"],
1424
1426
  td: ["colspan", "rowspan", "align", "valign"],
1425
1427
  th: ["colspan", "rowspan", "align", "valign"]
1426
1428
  };
1427
- function L(s, t, e) {
1429
+ function M(s, t, e) {
1428
1430
  if ((t == null ? void 0 : t.sanitize) === !1)
1429
1431
  return s;
1430
1432
  const o = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : q, i = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : V, r = document.createElement("div");
@@ -1458,21 +1460,21 @@ function G(s, t) {
1458
1460
  break;
1459
1461
  }
1460
1462
  }
1461
- (l.startsWith("on") || l === "javascript:" || l === "href" && a.value.trim().toLowerCase().startsWith("javascript:") || l === "src" && a.value.trim().toLowerCase().startsWith("javascript:")) && (c = !1), c || s.removeAttribute(a.name);
1463
+ (l.startsWith("on") || l === "javascript:" || l === "href" && a.value.trim().toLowerCase().startsWith("javascript:") || l === "src" && a.value.trim().toLowerCase().startsWith("javascript:")) && (c = !1), l === "dir" && !["ltr", "rtl", "auto"].includes(a.value.trim().toLowerCase()) && (c = !1), c || s.removeAttribute(a.name);
1462
1464
  }
1463
1465
  s.hasAttribute("href") && (s.getAttribute("href") || "").trim().toLowerCase().startsWith("javascript:") && s.removeAttribute("href"), s.hasAttribute("src") && (s.getAttribute("src") || "").trim().toLowerCase().startsWith("javascript:") && s.removeAttribute("src");
1464
1466
  }
1465
1467
  function X(s, t, e) {
1466
- return (e == null ? void 0 : e.sanitizeOnPaste) === !1 ? s : L(s, t);
1468
+ return (e == null ? void 0 : e.sanitizeOnPaste) === !1 ? s : M(s, t);
1467
1469
  }
1468
1470
  function Y(s, t, e) {
1469
- return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? s : L(s, t);
1471
+ return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? s : M(s, t);
1470
1472
  }
1471
1473
  const J = '.editora-editor{display:flex;flex-direction:column;border:1px solid #ddd;border-radius:4px;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;overflow:hidden}.editora-editor *{box-sizing:border-box}.editora-theme-light{background:#fff;color:#333}.editora-theme-dark{--editora-dark-toolbar-bg-start: #353d48;--editora-dark-toolbar-bg-end: #2d3540;--editora-dark-button-bg-start: #46505f;--editora-dark-button-bg-end: #3b4553;--editora-dark-button-hover-start: #525d6d;--editora-dark-button-hover-end: #465262;--editora-dark-button-active-start: #5eaaf6;--editora-dark-button-active-end: #4a95de;--editora-dark-border: #475263;--editora-dark-border-strong: #566275;--editora-dark-text: #e1e9f5;--editora-dark-text-strong: #f3f7ff;--editora-dark-text-muted: #aeb9cc;--editora-dark-surface: #1d242d;--editora-dark-content: #1f2732;background:linear-gradient(180deg,#1b2330,#1c2430);color:var(--editora-dark-text);border-color:var(--editora-dark-border)}.editora-toolbar{display:flex;align-items:center;gap:4px;padding:8px;background:#f5f5f5;border-bottom:1px solid #ddd;flex-wrap:wrap}.editora-theme-dark .editora-toolbar{background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%);border-bottom-color:var(--editora-dark-border);box-shadow:inset 0 1px #ffffff0d}.editora-toolbar-sticky{position:sticky;top:0;z-index:100;position:-webkit-sticky}.editora-toolbar-group{display:flex;align-items:center;gap:2px}.editora-toolbar-button{padding:6px 12px;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-weight:600;font-size:14px;height:30px;display:flex;align-items:center;white-space:nowrap}.editora-toolbar-group-button{display:flex;align-items:center}.editora-toolbar-input.font-size{width:40px;padding:.25rem;text-align:center;font-size:14px;background:#fff;border:1px solid var(--rte-color-border-light);border-radius:var(--rte-radius-sm)}.editora-toolbar-group-items{display:flex;align-items:center;border:1px solid #ccc;.editora-toolbar-button{border:none;border-radius:0;&:first-child{border-right:1px solid #ccc;border-top-left-radius:3px;border-bottom-left-radius:3px}&:last-child{border:0px solid #ccc;border-radius:0!important}&:hover{background:#e0e0e0;border-color:#ccc}}}.editora-theme-dark .editora-toolbar-button{background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%);border-color:var(--editora-dark-border-strong);color:var(--editora-dark-text);box-shadow:inset 0 1px #ffffff14,0 1px 1px #00000059}.editora-theme-dark .editora-toolbar-group-items{border-color:var(--editora-dark-border-strong);background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%)}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:first-child{border-right-color:#566275}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:last-child{border-left-color:#566275}.editora-theme-dark .editora-toolbar-input.font-size{background-color:#2e3642;color:var(--editora-dark-text-strong);border-color:var(--editora-dark-border-strong);caret-color:var(--editora-dark-text-strong)}.editora-theme-dark .editora-toolbar-input.font-size::placeholder{color:var(--editora-dark-text-strong);opacity:1}.editora-toolbar-button:hover{background:#e0e0e0;border-color:#ccc}.editora-theme-dark .editora-toolbar-button:hover{background:linear-gradient(180deg,var(--editora-dark-button-hover-start) 0%,var(--editora-dark-button-hover-end) 100%);border-color:#66748a;color:var(--editora-dark-text-strong)}.editora-toolbar-button:active,.editora-toolbar-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-button:active,.editora-theme-dark .editora-toolbar-button.active{background:linear-gradient(180deg,var(--editora-dark-button-active-start) 0%,var(--editora-dark-button-active-end) 100%);border-color:#67adf4;color:#0f1b2a}.editora-theme-dark .editora-toolbar-button:disabled{background:#313946;border-color:#424d5e;color:#7f8ca1}.editora-theme-dark .editora-toolbar-button[data-command=insertTable],.editora-theme-dark .editora-toolbar-button[data-command=print],.editora-theme-dark .editora-toolbar-button[data-command=toggleSpellCheck],.editora-theme-dark .editora-toolbar-button[data-command=toggleA11yChecker],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionLTR],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionRTL]{color:#f1f6ff}.editora-toolbar-button:disabled{opacity:.5;cursor:not-allowed}.editora-toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;line-height:1}.editora-toolbar-button svg,.editora-toolbar-icon svg{width:20px;height:20px;display:block;color:currentColor;fill:currentColor}.editora-theme-dark .editora-toolbar-icon,.editora-theme-dark .editora-toolbar-icon *{color:inherit}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([stroke="#000" i],[stroke="#000000" i],[stroke=black i],[stroke="#0f0f0f" i],[stroke="#111111" i],[style*="stroke:#000" i],[style*="stroke: #000" i],[style*="stroke:black" i],[style*="stroke: black" i],[style*="stroke:#0f0f0f" i],[style*="stroke: #0f0f0f" i]){stroke:currentColor!important}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([fill="#000" i],[fill="#000000" i],[fill=black i],[fill="#0f0f0f" i],[fill="#111111" i],[style*="fill:#000" i],[style*="fill: #000" i],[style*="fill:black" i],[style*="fill: black" i],[style*="fill:#0f0f0f" i],[style*="fill: #0f0f0f" i]){fill:currentColor!important}.editora-toolbar-separator{width:1px;height:24px;background:#ddd;margin:0 4px}.editora-theme-dark .editora-toolbar-separator{background:#4d596b}.editora-toolbar-dropdown{position:relative}.editora-toolbar-dropdown-menu{position:absolute;top:100%;left:0;min-width:150px;margin-top:4px;padding:4px 0;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-toolbar-dropdown-menu{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;color:#333;text-align:left;cursor:pointer;font-size:13px;transition:background .15s ease}.editora-theme-dark .editora-toolbar-dropdown-item{color:#d7deea}.editora-toolbar-dropdown-item:hover{background:#f5f5f5}.editora-theme-dark .editora-toolbar-dropdown-item:hover{background:#3a4554;color:#f0f6ff}.editora-content{flex:1;min-height:200px;padding:16px;outline:none;overflow-y:auto;line-height:1.6}.editora-theme-dark .editora-content{color:#ecf3ff;background:linear-gradient(180deg,var(--editora-dark-content) 0%,#1c232e 100%)}.editora-content:empty:before{content:attr(data-placeholder);color:#999;pointer-events:none}.editora-theme-dark .editora-content:empty:before{color:#8f9bb0}.editora-content h1{font-size:2em;margin:.67em 0;font-weight:600}.editora-content h2{font-size:1.5em;margin:.75em 0;font-weight:600}.editora-content h3{font-size:1.17em;margin:.83em 0;font-weight:600}.editora-content p{margin:1em 0}.editora-theme-dark .editora-content,.editora-theme-dark .editora-content :is(p,span,div,li,ul,ol,td,th,h1,h2,h3,h4,h5,h6,strong,em,u,s,small,sub,sup,blockquote,code,pre,a){color:#ecf3ff}.editora-content ul,.editora-content ol{margin:1em 0;padding-left:2em}.editora-content a{color:#06c;text-decoration:underline}.editora-theme-dark .editora-content a{color:#ecf3ff}.editora-content code{padding:2px 4px;background:#f5f5f5;border-radius:3px;font-family:Monaco,Menlo,Consolas,monospace;font-size:.9em}.editora-theme-dark .editora-content code{background:#1e1e1e}.editora-content pre{padding:12px;background:#f5f5f5;border-radius:4px;overflow-x:auto;margin:1em 0}.editora-theme-dark .editora-content pre{background:#1e1e1e}.editora-theme-dark .rte-code-block{background:linear-gradient(180deg,#212a36,#1b2430)!important;border-color:#4f5b70!important;color:#e7effc!important}.editora-theme-dark .rte-code-block code{color:#e7effc!important}.editora-theme-dark .rte-code-block:before{background:#111927!important;color:#dce8ff!important}.editora-theme-dark .rte-code-block .rte-code-copy{background:#2b3441!important;border-color:#5a667b!important;color:#dce8ff!important}.editora-content blockquote{margin:1em 0;padding-left:1em;border-left:4px solid #ddd;color:#666}.editora-theme-dark .editora-content blockquote{border-left-color:#3c3c3c;color:#ecf3ff}.editora-floating-toolbar{position:absolute;padding:4px;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-floating-toolbar{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-statusbar-container{display:flex;flex-direction:column}.editora-statusbar-left{display:flex;align-items:center;gap:8px}.editora-statusbar-right{display:flex;align-items:center;gap:8px;margin-left:auto}.editora-statusbar{display:flex;align-items:center;gap:12px;padding:6px 12px;background:#f5f5f5;border-top:1px solid #ddd;font-size:12px;color:#666}.editora-theme-dark .editora-statusbar{background:linear-gradient(180deg,#2c3440,#252d37);border-top-color:#3f4a5b;color:#d7deea}.editora-statusbar-item{white-space:nowrap}.editora-statusbar-separator{color:#ddd}.editora-theme-dark .editora-statusbar-separator{color:#566275}.editora-editor[readonly] .editora-content{background:#fafafa;cursor:not-allowed}.editora-theme-dark.editora-editor[readonly] .editora-content{background:#1a1a1a}.editora-editor:focus-within{border-color:#06c;box-shadow:0 0 0 3px #0066cc1a}.editora-theme-dark.editora-editor:focus-within{border-color:#4db8ff;box-shadow:0 0 0 3px #4db8ff1a}.editora-editor[disabled]{opacity:.6;pointer-events:none}@media(max-width:768px){.editora-toolbar{padding:4px}.editora-toolbar-button{min-width:28px;min-height:28px;padding:4px 8px;font-size:12px}.editora-content{padding:12px}}.editora-content ::selection{background:#06c3}.editora-theme-dark .editora-content ::selection{background:#4db8ff33}.editora-content table{border-collapse:collapse;width:100%;margin:1em 0}.editora-content th,.editora-content td{border:1px solid #ddd;padding:8px 12px;text-align:left}.editora-theme-dark .editora-content th,.editora-theme-dark .editora-content td{border-color:#3c3c3c}.editora-content th{background:#f5f5f5;font-weight:600}.editora-theme-dark .editora-content th{background:#252526}.editora-content img{max-width:100%;height:auto;border-radius:4px;display:block}.editora-content video{max-width:100%;height:auto;border-radius:4px;display:block}.editora-editor.loading{opacity:.7;pointer-events:none}.editora-editor.loading:after{content:"";position:absolute;top:50%;left:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border:3px solid #ddd;border-top-color:#06c;border-radius:50%;animation:editora-spin .8s linear infinite}@keyframes editora-spin{to{transform:rotate(360deg)}}.toolbar-container-wrapper{display:flex;align-items:center;background:#fff;border-bottom:1px solid #e0e0e0;padding:0;margin:0;width:100%;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.5;position:relative}.toolbar-container-wrapper[data-toolbar-sticky=true]{position:sticky;top:0;z-index:999;box-shadow:0 2px 4px #0000001a}.toolbar-container-wrapper[data-toolbar-floating=true]{position:fixed;top:0;left:0;right:0;z-index:1000;box-shadow:0 4px 12px #00000026}.toolbar-container-wrapper[data-toolbar-position=bottom]{border-bottom:none;border-top:1px solid #e0e0e0}.toolbar-container-wrapper .toolbar-wrapper{display:flex;width:100%;padding:8px;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar{display:flex;width:100%;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar-container{display:flex;gap:4px;flex-wrap:wrap;align-items:center;flex:1;position:relative}.toolbar-container-wrapper .toolbar-item{display:flex;align-items:center;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:6px 10px;border:1px solid #d1d5db;background:#fff;border-radius:4px;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;gap:4px;transition:all .15s ease;min-height:32px;white-space:nowrap}.toolbar-container-wrapper .toolbar-button:hover{background-color:#f3f4f6;border-color:#9ca3af}.toolbar-container-wrapper .toolbar-button:active,.toolbar-container-wrapper .toolbar-button[data-active=true]{background-color:#06c;color:#fff;border-color:#0052a3;box-shadow:inset 0 1px 3px #0000001a}.toolbar-container-wrapper .toolbar-button:disabled{opacity:.5;cursor:not-allowed;background-color:#f9fafb}.toolbar-container-wrapper .toolbar-more-button{padding:6px 8px;font-size:16px;font-weight:500;line-height:1}.toolbar-container-wrapper .toolbar-separator{width:1px;height:24px;background-color:#d1d5db;margin:0 4px}.toolbar-container-wrapper .toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0}.toolbar-container-wrapper .toolbar-icon svg{width:100%;height:100%}.toolbar-container-wrapper .toolbar-dropdown{position:relative;display:flex;align-items:center}.toolbar-container-wrapper .toolbar-dropdown-arrow{font-size:10px;margin-left:2px;line-height:1}.toolbar-container-wrapper .toolbar-dropdown-menu{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:6px;box-shadow:0 4px 12px #00000026;z-index:1000;min-width:160px;padding:4px 0;margin-top:4px;display:none}.toolbar-container-wrapper .toolbar-dropdown-menu.show{display:block}.toolbar-container-wrapper .toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;text-align:left;cursor:pointer;font-size:13px;color:#1f2937;transition:background-color .15s ease;font-family:inherit}.toolbar-container-wrapper .toolbar-dropdown-item:hover{background-color:#f3f4f6}.toolbar-container-wrapper .toolbar-dropdown-item:active{background-color:#e5e7eb}.toolbar-container-wrapper .toolbar-input{padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:13px;font-family:inherit;background-color:#fff;color:#1f2937;transition:all .15s ease}.toolbar-container-wrapper .toolbar-input:focus{outline:none;border-color:#06c;box-shadow:0 0 0 3px #0066cc1a;background-color:#fff}.toolbar-container-wrapper .toolbar-input::placeholder{color:#9ca3af}.toolbar-overflow-menu{animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.toolbar-overflow-item{transition:background-color .15s ease}.floating-toolbar{user-select:none;-webkit-user-select:none;font-family:system-ui,-apple-system,sans-serif;font-size:14px;animation:fadeInUp .15s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.floating-toolbar-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:4px;color:#495057;cursor:pointer;font-size:14px;font-weight:500;transition:all .15s ease;outline:none}.floating-toolbar-btn:hover{background:#f8f9fa;color:#212529}.floating-toolbar-btn:active{background:#e9ecef;transform:scale(.95)}.floating-toolbar-btn.floating-toolbar-toggle{color:#dc3545;font-weight:700}.floating-toolbar-btn.floating-toolbar-toggle:hover{background:#f8d7da;color:#721c24}.floating-toolbar-separator{width:1px;height:20px;background:#e1e5e9;margin:0 2px}@media(max-width:768px){.toolbar-container-wrapper .toolbar-button{padding:5px 8px;font-size:12px;min-height:28px}.toolbar-container-wrapper .toolbar-icon{width:16px;height:16px}.toolbar-container-wrapper .toolbar-dropdown-menu{min-width:140px}.toolbar-container-wrapper .toolbar-dropdown-item{padding:6px 10px;font-size:12px}.floating-toolbar{padding:4px;gap:2px}.floating-toolbar-btn{width:28px;height:28px;font-size:12px}}@media(max-width:480px){.toolbar-container-wrapper{padding:4px}.toolbar-container-wrapper .toolbar-wrapper{padding:4px;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:4px 6px;font-size:11px;min-height:24px}.toolbar-container-wrapper .toolbar-icon{width:14px;height:14px}}.floating-toolbar{pointer-events:auto}.floating-toolbar{max-width:calc(100vw - 20px);overflow-x:auto}@media(prefers-color-scheme:dark){.floating-toolbar{background:#2d3748;border-color:#4a5568;color:#e2e8f0}.floating-toolbar-btn:hover{background:#4a5568;color:#f7fafc}.floating-toolbar-btn:active{background:#718096}.floating-toolbar-separator{background:#4a5568}}';
1472
1474
  let y;
1473
1475
  const Q = "__editoraCommandEditorRoot", Z = "__editoraLastCommandButton", S = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", T = ".rte-content, .editora-content", C = /* @__PURE__ */ new Set();
1474
- let g = null, A = !1, k = null, x = null;
1475
- function M(s) {
1476
+ let g = null, A = !1, k = null, w = null;
1477
+ function L(s) {
1476
1478
  if (!(s instanceof HTMLElement)) return !1;
1477
1479
  const t = s;
1478
1480
  return typeof t.execCommand == "function" && (t.tagName.toLowerCase() === "editora-editor" || t.classList.contains("editora-editor") || t.hasAttribute("data-editora-editor"));
@@ -1482,10 +1484,10 @@ function tt(s) {
1482
1484
  }
1483
1485
  function b(s) {
1484
1486
  if (!s) return null;
1485
- if (M(s))
1487
+ if (L(s))
1486
1488
  return s;
1487
1489
  const t = s.matches(S) ? s : s.closest(S);
1488
- return !t || !M(t) ? null : t;
1490
+ return !t || !L(t) ? null : t;
1489
1491
  }
1490
1492
  function et() {
1491
1493
  var n;
@@ -1523,10 +1525,10 @@ function et() {
1523
1525
  }
1524
1526
  function ot() {
1525
1527
  if (typeof window == "undefined" || A) return;
1526
- k = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, x = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
1528
+ k = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, w = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
1527
1529
  const s = (t, e) => {
1528
1530
  const o = et();
1529
- return o ? o.execCommand(t, e) : k ? k(t, e) : x ? x(t, e) : !1;
1531
+ return o ? o.execCommand(t, e) : k ? k(t, e) : w ? w(t, e) : !1;
1530
1532
  };
1531
1533
  window.executeEditorCommand = s, window.execEditorCommand = s, A = !0;
1532
1534
  }
@@ -2251,7 +2253,7 @@ class m extends HTMLElement {
2251
2253
  const o = this.attributes[e];
2252
2254
  t[o.name] = o.value;
2253
2255
  }
2254
- return w.resolve({
2256
+ return x.resolve({
2255
2257
  jsConfig: this.jsConfig,
2256
2258
  attributes: t
2257
2259
  });
@@ -2330,8 +2332,8 @@ export {
2330
2332
  W as e,
2331
2333
  U as f,
2332
2334
  F as g,
2333
- w as h,
2335
+ x as h,
2334
2336
  K as i,
2335
2337
  nt as j
2336
2338
  };
2337
- //# sourceMappingURL=index-DqC57IEH.mjs.map
2339
+ //# sourceMappingURL=index-DBoj6QfW.mjs.map
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index-D1LOqg5C.js");class v{constructor(e){if(this.listeners=[],e instanceof l.PluginManager)this.pluginManager=e;else{const i=e;this.pluginManager=new l.PluginManager,i.plugins&&Array.isArray(i.plugins)&&i.plugins.forEach(n=>{this.pluginManager.register(n)}),i.element&&(this.domElement=i.element,this.setupDOMElement(i))}const t=this.pluginManager.buildSchema();this.state=l.EditorState.create(t),this.commands=this.pluginManager.getCommands()}setupDOMElement(e){this.domElement&&(e.enableToolbar!==!1&&e.toolbarElement?this.toolbarElement=e.toolbarElement:e.enableToolbar!==!1&&(this.toolbarElement=document.createElement("div"),this.toolbarElement.className="editora-toolbar-container",this.domElement.appendChild(this.toolbarElement)),this.contentElement=document.createElement("div"),this.contentElement.contentEditable="true",this.contentElement.className="editora-content",this.contentElement.style.minHeight="200px",this.contentElement.style.outline="none",this.contentElement.style.padding="12px",e.content&&(this.contentElement.innerHTML=e.content),this.domElement.appendChild(this.contentElement),this.contentElement.addEventListener("input",()=>{this.listeners.forEach(t=>t(this.state))}))}setupKeyboardShortcuts(e){const t={};e.forEach(i=>{i.shortcut&&(t[i.shortcut.toLowerCase()]=i.command)}),document.addEventListener("keydown",i=>{if(this.contentElement!==document.activeElement&&!(document.activeElement instanceof HTMLElement&&document.activeElement.contentEditable==="true"))return;const n=[];(i.ctrlKey||i.metaKey)&&n.push("ctrl"),i.shiftKey&&n.push("shift"),i.altKey&&n.push("alt");const o=i.key.toLowerCase(),s=n.length>0?`${n.join("+")}+${o}`:o,a=t[s];a&&(i.preventDefault(),this.execCommand(a))})}handleToolbarCommand(e,t){const n=this.pluginManager.getToolbarItems().find(o=>o.id&&o.id===e||o.command===e);n!=null&&n.command&&(t!==void 0?this.execCommand(n.command,t):this.execCommand(n.command))}setState(e){this.state=e,this.listeners.forEach(t=>t(e))}onChange(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)}}on(e,t){return e==="change"||e==="input"?this.onChange(t):()=>{}}getElement(){return this.contentElement||this.domElement||null}execCommand(e,t){const i=this.commands[e];if(!i)return console.warn(`Command not found: ${e}`),!1;let n;return t!==void 0?n=i(this.state,t):n=i(this.state),n instanceof Promise?(n.then(o=>{o&&typeof o=="object"&&"doc"in o&&"selection"in o&&this.setState(o)}).catch(o=>{console.error(`Async command failed: ${e}`,o)}),!0):n&&typeof n=="object"&&"doc"in n&&"selection"in n?(this.setState(n),!0):n!==!1&&n!=null}setContent(e){typeof e=="string"?this.contentElement&&(this.contentElement.innerHTML=e):this.setState(this.state.apply(e))}getContent(){return this.contentElement?this.contentElement.innerHTML:this.state.doc}destroy(){this.listeners=[],this.contentElement&&this.contentElement.removeEventListener("input",()=>{})}}class b{constructor(e){this.initialized=!1,this.plugin=e}initialize(e){var t,i;if(this.initialized)return console.warn(`Plugin "${this.plugin.name}" already initialized`),!1;try{return this.context=e,(t=this.plugin.context)!=null&&t.initialize&&this.plugin.context.initialize(),(i=this.plugin.context)!=null&&i.onEditorReady&&e.provider&&this.plugin.context.onEditorReady(e),this.initialized=!0,!0}catch(n){return console.error(`Failed to initialize plugin "${this.plugin.name}":`,n),!1}}destroy(){var e;if(!this.initialized)return!1;try{return(e=this.plugin.context)!=null&&e.destroy&&this.plugin.context.destroy(),this.initialized=!1,this.context=void 0,!0}catch(t){return console.error(`Failed to destroy plugin "${this.plugin.name}":`,t),!1}}executeCommand(e,...t){var i;if(!this.initialized)return console.warn(`Plugin "${this.plugin.name}" not initialized, cannot execute command "${e}"`),null;try{const n=(i=this.plugin.commands)==null?void 0:i[e];return n?n(...t):(console.warn(`Command "${e}" not found in plugin "${this.plugin.name}"`),null)}catch(n){return console.error(`Error executing command "${e}" in plugin "${this.plugin.name}":`,n),null}}getName(){return this.plugin.name}isInitialized(){return this.initialized}getPlugin(){return this.plugin}getContext(){return this.context}}function E(r){return new b(r)}function x(r={}){const{enabled:e=!1,provider:t="browser",apiUrl:i="",apiHeaders:n={},language:o="en",customDictionary:s=[],ignoreAllCaps:a=!0,ignoreNumbers:c=!0}=r;return{name:"spellcheck",context:{initialize:()=>{if(e)switch(console.log("[Spellcheck Plugin] Initialized",{provider:t,language:o}),t){case"browser":console.log("[Spellcheck] Using browser spellcheck");break;case"local":console.log("[Spellcheck] Using local dictionary (not implemented)");break;case"api":i?console.log("[Spellcheck] Using API:",i):console.warn("[Spellcheck] API provider selected but no apiUrl provided");break}},destroy:()=>{console.log("[Spellcheck Plugin] Destroyed")},onEditorReady:h=>{console.log("[Spellcheck Plugin] Editor ready")}},commands:{toggleSpellcheck:()=>(console.log("[Spellcheck] Toggle command (not implemented)"),null),addToDictionary:h=>(console.log("[Spellcheck] Add to dictionary:",h),null),checkSpelling:async()=>(console.log("[Spellcheck] Check spelling (not implemented)"),null)},toolbar:e?[{label:"Spellcheck",command:"toggleSpellcheck",icon:"Aa",type:"button"}]:[]}}function w(r={}){const{uploadUrl:e="",libraryUrl:t="",maxFileSize:i=10*1024*1024,allowedTypes:n=["image/jpeg","image/png","image/gif","image/webp"],headers:o={},withCredentials:s=!1,chunkSize:a=1024*1024,enableChunking:c=!0,onProgress:h,onError:u,onSuccess:$}=r;return{name:"media",context:{initialize:()=>{console.log("[Media Plugin] Initialized",{uploadUrl:e,libraryUrl:t,maxFileSize:i,allowedTypes:n}),e||console.warn("[Media] No uploadUrl provided - upload will not work")},destroy:()=>{console.log("[Media Plugin] Destroyed")},onEditorReady:d=>{console.log("[Media Plugin] Editor ready")}},commands:{insertImage:async d=>{if(console.log("[Media] Insert image command (not implemented)",d),!d)return console.log("[Media] No file provided - should open picker"),null;if(!n.includes(d.type)){const g=new Error(`File type ${d.type} not allowed`);return u==null||u(g),null}if(d.size>i){const g=new Error(`File size ${d.size} exceeds max ${i}`);return u==null||u(g),null}return null},openMediaLibrary:()=>(console.log("[Media] Open media library (not implemented)"),t||console.warn("[Media] No libraryUrl provided"),null),uploadMedia:async d=>(console.log("[Media] Upload media (not implemented)",{name:d.name,size:d.size,type:d.type}),null)},toolbar:[{label:"Image",command:"insertImage",icon:"🖼️",type:"button"},{label:"Media Library",command:"openMediaLibrary",icon:"📁",type:"button"}]}}class p{constructor(e,t={anchor:0,head:0}){this.doc=e,this.selection=t}getDocument(){return this.doc}setDocument(e){return new p(e,this.selection)}getSelection(){return{...this.selection}}setSelection(e){return new p(this.doc,e)}update(e,t){return new p(e||this.doc,t||this.selection)}getTextContent(){return""}isSelectionEmpty(){return this.selection.anchor===this.selection.head}}class m{constructor(e){this.config={closeOnEscape:!0,closeOnBackdrop:!0,...e},this.element=this.createElement(),this.attachEventListeners()}createElement(){const e=document.createElement("dialog");e.className="editora-dialog",this.config.width&&(e.style.width=this.config.width),this.config.height&&(e.style.height=this.config.height);const t=this.config.buttons&&this.config.buttons.length>0?this.config.buttons.map((i,n)=>`<button type="button" class="editora-btn ${i.type==="danger"?"editora-btn-danger":i.type==="primary"||i.primary?"editora-btn-primary":"editora-btn-cancel"}" data-dialog-button="${n}">${i.label}</button>`).join(""):`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index-CPMGUZfB.js");class v{constructor(e){if(this.listeners=[],e instanceof l.PluginManager)this.pluginManager=e;else{const i=e;this.pluginManager=new l.PluginManager,i.plugins&&Array.isArray(i.plugins)&&i.plugins.forEach(n=>{this.pluginManager.register(n)}),i.element&&(this.domElement=i.element,this.setupDOMElement(i))}const t=this.pluginManager.buildSchema();this.state=l.EditorState.create(t),this.commands=this.pluginManager.getCommands()}setupDOMElement(e){this.domElement&&(e.enableToolbar!==!1&&e.toolbarElement?this.toolbarElement=e.toolbarElement:e.enableToolbar!==!1&&(this.toolbarElement=document.createElement("div"),this.toolbarElement.className="editora-toolbar-container",this.domElement.appendChild(this.toolbarElement)),this.contentElement=document.createElement("div"),this.contentElement.contentEditable="true",this.contentElement.className="editora-content",this.contentElement.style.minHeight="200px",this.contentElement.style.outline="none",this.contentElement.style.padding="12px",e.content&&(this.contentElement.innerHTML=e.content),this.domElement.appendChild(this.contentElement),this.contentElement.addEventListener("input",()=>{this.listeners.forEach(t=>t(this.state))}))}setupKeyboardShortcuts(e){const t={};e.forEach(i=>{i.shortcut&&(t[i.shortcut.toLowerCase()]=i.command)}),document.addEventListener("keydown",i=>{if(this.contentElement!==document.activeElement&&!(document.activeElement instanceof HTMLElement&&document.activeElement.contentEditable==="true"))return;const n=[];(i.ctrlKey||i.metaKey)&&n.push("ctrl"),i.shiftKey&&n.push("shift"),i.altKey&&n.push("alt");const o=i.key.toLowerCase(),s=n.length>0?`${n.join("+")}+${o}`:o,a=t[s];a&&(i.preventDefault(),this.execCommand(a))})}handleToolbarCommand(e,t){const n=this.pluginManager.getToolbarItems().find(o=>o.id&&o.id===e||o.command===e);n!=null&&n.command&&(t!==void 0?this.execCommand(n.command,t):this.execCommand(n.command))}setState(e){this.state=e,this.listeners.forEach(t=>t(e))}onChange(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)}}on(e,t){return e==="change"||e==="input"?this.onChange(t):()=>{}}getElement(){return this.contentElement||this.domElement||null}execCommand(e,t){const i=this.commands[e];if(!i)return console.warn(`Command not found: ${e}`),!1;let n;return t!==void 0?n=i(this.state,t):n=i(this.state),n instanceof Promise?(n.then(o=>{o&&typeof o=="object"&&"doc"in o&&"selection"in o&&this.setState(o)}).catch(o=>{console.error(`Async command failed: ${e}`,o)}),!0):n&&typeof n=="object"&&"doc"in n&&"selection"in n?(this.setState(n),!0):n!==!1&&n!=null}setContent(e){typeof e=="string"?this.contentElement&&(this.contentElement.innerHTML=e):this.setState(this.state.apply(e))}getContent(){return this.contentElement?this.contentElement.innerHTML:this.state.doc}destroy(){this.listeners=[],this.contentElement&&this.contentElement.removeEventListener("input",()=>{})}}class b{constructor(e){this.initialized=!1,this.plugin=e}initialize(e){var t,i;if(this.initialized)return console.warn(`Plugin "${this.plugin.name}" already initialized`),!1;try{return this.context=e,(t=this.plugin.context)!=null&&t.initialize&&this.plugin.context.initialize(),(i=this.plugin.context)!=null&&i.onEditorReady&&e.provider&&this.plugin.context.onEditorReady(e),this.initialized=!0,!0}catch(n){return console.error(`Failed to initialize plugin "${this.plugin.name}":`,n),!1}}destroy(){var e;if(!this.initialized)return!1;try{return(e=this.plugin.context)!=null&&e.destroy&&this.plugin.context.destroy(),this.initialized=!1,this.context=void 0,!0}catch(t){return console.error(`Failed to destroy plugin "${this.plugin.name}":`,t),!1}}executeCommand(e,...t){var i;if(!this.initialized)return console.warn(`Plugin "${this.plugin.name}" not initialized, cannot execute command "${e}"`),null;try{const n=(i=this.plugin.commands)==null?void 0:i[e];return n?n(...t):(console.warn(`Command "${e}" not found in plugin "${this.plugin.name}"`),null)}catch(n){return console.error(`Error executing command "${e}" in plugin "${this.plugin.name}":`,n),null}}getName(){return this.plugin.name}isInitialized(){return this.initialized}getPlugin(){return this.plugin}getContext(){return this.context}}function E(r){return new b(r)}function x(r={}){const{enabled:e=!1,provider:t="browser",apiUrl:i="",apiHeaders:n={},language:o="en",customDictionary:s=[],ignoreAllCaps:a=!0,ignoreNumbers:c=!0}=r;return{name:"spellcheck",context:{initialize:()=>{if(e)switch(console.log("[Spellcheck Plugin] Initialized",{provider:t,language:o}),t){case"browser":console.log("[Spellcheck] Using browser spellcheck");break;case"local":console.log("[Spellcheck] Using local dictionary (not implemented)");break;case"api":i?console.log("[Spellcheck] Using API:",i):console.warn("[Spellcheck] API provider selected but no apiUrl provided");break}},destroy:()=>{console.log("[Spellcheck Plugin] Destroyed")},onEditorReady:h=>{console.log("[Spellcheck Plugin] Editor ready")}},commands:{toggleSpellcheck:()=>(console.log("[Spellcheck] Toggle command (not implemented)"),null),addToDictionary:h=>(console.log("[Spellcheck] Add to dictionary:",h),null),checkSpelling:async()=>(console.log("[Spellcheck] Check spelling (not implemented)"),null)},toolbar:e?[{label:"Spellcheck",command:"toggleSpellcheck",icon:"Aa",type:"button"}]:[]}}function w(r={}){const{uploadUrl:e="",libraryUrl:t="",maxFileSize:i=10*1024*1024,allowedTypes:n=["image/jpeg","image/png","image/gif","image/webp"],headers:o={},withCredentials:s=!1,chunkSize:a=1024*1024,enableChunking:c=!0,onProgress:h,onError:u,onSuccess:$}=r;return{name:"media",context:{initialize:()=>{console.log("[Media Plugin] Initialized",{uploadUrl:e,libraryUrl:t,maxFileSize:i,allowedTypes:n}),e||console.warn("[Media] No uploadUrl provided - upload will not work")},destroy:()=>{console.log("[Media Plugin] Destroyed")},onEditorReady:d=>{console.log("[Media Plugin] Editor ready")}},commands:{insertImage:async d=>{if(console.log("[Media] Insert image command (not implemented)",d),!d)return console.log("[Media] No file provided - should open picker"),null;if(!n.includes(d.type)){const g=new Error(`File type ${d.type} not allowed`);return u==null||u(g),null}if(d.size>i){const g=new Error(`File size ${d.size} exceeds max ${i}`);return u==null||u(g),null}return null},openMediaLibrary:()=>(console.log("[Media] Open media library (not implemented)"),t||console.warn("[Media] No libraryUrl provided"),null),uploadMedia:async d=>(console.log("[Media] Upload media (not implemented)",{name:d.name,size:d.size,type:d.type}),null)},toolbar:[{label:"Image",command:"insertImage",icon:"🖼️",type:"button"},{label:"Media Library",command:"openMediaLibrary",icon:"📁",type:"button"}]}}class p{constructor(e,t={anchor:0,head:0}){this.doc=e,this.selection=t}getDocument(){return this.doc}setDocument(e){return new p(e,this.selection)}getSelection(){return{...this.selection}}setSelection(e){return new p(this.doc,e)}update(e,t){return new p(e||this.doc,t||this.selection)}getTextContent(){return""}isSelectionEmpty(){return this.selection.anchor===this.selection.head}}class m{constructor(e){this.config={closeOnEscape:!0,closeOnBackdrop:!0,...e},this.element=this.createElement(),this.attachEventListeners()}createElement(){const e=document.createElement("dialog");e.className="editora-dialog",this.config.width&&(e.style.width=this.config.width),this.config.height&&(e.style.height=this.config.height);const t=this.config.buttons&&this.config.buttons.length>0?this.config.buttons.map((i,n)=>`<button type="button" class="editora-btn ${i.type==="danger"?"editora-btn-danger":i.type==="primary"||i.primary?"editora-btn-primary":"editora-btn-cancel"}" data-dialog-button="${n}">${i.label}</button>`).join(""):`
2
2
  <button type="button" class="editora-btn editora-btn-cancel" data-dialog-default="cancel">Cancel</button>
3
3
  <button type="button" class="editora-btn editora-btn-primary" data-dialog-default="ok">OK</button>
4
4
  `;if(e.innerHTML=`
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { P as g, E as y, a as b, T as f, R as v } from "./index-DqC57IEH.mjs";
2
- import { C as G, h as O, F as V, K, i as B, S as W, b as X, e as _, d as Y, g as J, f as Q, c as Z } from "./index-DqC57IEH.mjs";
1
+ import { P as g, E as y, a as b, T as f, R as v } from "./index-DBoj6QfW.mjs";
2
+ import { C as G, h as O, F as V, K, i as B, S as W, b as X, e as _, d as Y, g as J, f as Q, c as Z } from "./index-DBoj6QfW.mjs";
3
3
  class L {
4
4
  constructor(e) {
5
5
  if (this.listeners = [], e instanceof g)
@@ -0,0 +1,97 @@
1
+ const f = "data-editora-selection-marker";
2
+ function w(e) {
3
+ return e ? e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement : null;
4
+ }
5
+ function m(e) {
6
+ return e ? e.getAttribute("contenteditable") === "true" ? e : e.querySelector('[contenteditable="true"]') : null;
7
+ }
8
+ function y(e) {
9
+ var r;
10
+ if ((e == null ? void 0 : e.contentElement) instanceof HTMLElement) return e.contentElement;
11
+ const t = m((r = e == null ? void 0 : e.editorElement) != null ? r : null);
12
+ if (t) return t;
13
+ const n = typeof window != "undefined" ? window.__editoraCommandEditorRoot : null, o = n instanceof HTMLElement ? m(n) : null;
14
+ if (o) return o;
15
+ const l = window.getSelection();
16
+ if (l && l.rangeCount > 0) {
17
+ const a = w(l.getRangeAt(0).startContainer), i = a == null ? void 0 : a.closest('.rte-content, .editora-content, [contenteditable="true"]');
18
+ if (i instanceof HTMLElement) return i;
19
+ }
20
+ const c = document.activeElement;
21
+ if (c instanceof HTMLElement) {
22
+ const a = c.closest('.rte-content, .editora-content, [contenteditable="true"]');
23
+ if (a instanceof HTMLElement) return a;
24
+ }
25
+ return document.querySelector('.rte-content, .editora-content, [contenteditable="true"]');
26
+ }
27
+ function R(e) {
28
+ const t = window.getSelection();
29
+ if (!t || t.rangeCount === 0) return !1;
30
+ const n = t.getRangeAt(0);
31
+ return e.contains(n.startContainer) && e.contains(n.endContainer);
32
+ }
33
+ function E(e) {
34
+ const t = document.createElement("span");
35
+ return t.setAttribute(f, e), t.style.display = "inline-block", t.style.width = "0", t.style.height = "0", t.style.overflow = "hidden", t.style.lineHeight = "0", t.appendChild(document.createTextNode("\uFEFF")), t;
36
+ }
37
+ function b(e) {
38
+ const t = window.getSelection();
39
+ if (!t || t.rangeCount === 0) return null;
40
+ const n = t.getRangeAt(0);
41
+ if (!e.contains(n.startContainer) || !e.contains(n.endContainer))
42
+ return null;
43
+ const o = n.collapsed, l = E("start"), c = o ? null : E("end"), r = n.cloneRange();
44
+ if (c) {
45
+ const i = r.cloneRange();
46
+ i.collapse(!1), i.insertNode(c);
47
+ }
48
+ const a = r.cloneRange();
49
+ return a.collapse(!0), a.insertNode(l), () => {
50
+ const i = window.getSelection(), s = document.createRange(), d = e.querySelector(
51
+ `[${f}="start"]`
52
+ ), u = e.querySelector(
53
+ `[${f}="end"]`
54
+ );
55
+ if (!i || !d) {
56
+ e.querySelectorAll(`[${f}]`).forEach((g) => g.remove());
57
+ return;
58
+ }
59
+ o || !u ? (s.setStartBefore(d), s.collapse(!0)) : (s.setStartAfter(d), s.setEndBefore(u)), i.removeAllRanges(), i.addRange(s), d.remove(), u == null || u.remove();
60
+ };
61
+ }
62
+ function p(e, t, n) {
63
+ if (t !== n) {
64
+ if (typeof window.execEditorCommand == "function") {
65
+ window.execEditorCommand("recordDomTransaction", e, t, n);
66
+ return;
67
+ }
68
+ if (typeof window.executeEditorCommand == "function")
69
+ try {
70
+ window.executeEditorCommand("recordDomTransaction", { editor: e, beforeHTML: t, afterHTML: n });
71
+ } catch (o) {
72
+ }
73
+ }
74
+ }
75
+ function S(e) {
76
+ const t = y(e.context);
77
+ if (!t) return !1;
78
+ const n = t.innerHTML;
79
+ R(t) && t.focus({ preventScroll: !0 });
80
+ let o = !1;
81
+ try {
82
+ o = document.execCommand(e.command, !1);
83
+ } catch (r) {
84
+ o = !1;
85
+ }
86
+ const l = t.innerHTML;
87
+ if (e.normalize && l !== n) {
88
+ const r = b(t);
89
+ e.normalize(t), r == null || r();
90
+ }
91
+ const c = t.innerHTML;
92
+ return n !== c && (p(t, n, c), t.dispatchEvent(new Event("input", { bubbles: !0 }))), o !== !1 || n !== c;
93
+ }
94
+ export {
95
+ S as a
96
+ };
97
+ //# sourceMappingURL=inlineFormatting-DJ0-NZtx.mjs.map
@@ -1,15 +1,15 @@
1
1
  const r = {
2
2
  codeSample: () => import("./CodeSamplePlugin.native-CgGoH-X4.mjs").then((n) => n.CodeSamplePlugin()),
3
- checklist: () => import("./ChecklistPlugin.native-nuSSEFNI.mjs").then((n) => n.ChecklistPlugin()),
3
+ checklist: () => import("./ChecklistPlugin.native-BS-kMz9O.mjs").then((n) => n.ChecklistPlugin()),
4
4
  textAlignment: () => import("./TextAlignmentPlugin.native-sM_1s00t.mjs").then((n) => n.TextAlignmentPlugin()),
5
5
  indent: () => import("./IndentPlugin.native-BHixp8sP.mjs").then((n) => n.IndentPlugin()),
6
- direction: () => import("./DirectionPlugin.native-CDnbdNyl.mjs").then((n) => n.DirectionPlugin()),
6
+ direction: () => import("./DirectionPlugin.native-Bl-QLFzO.mjs").then((n) => n.DirectionPlugin()),
7
7
  textColor: () => import("./TextColorPlugin.native-Bwl_bSmc.mjs").then((n) => n.TextColorPlugin()),
8
8
  backgroundColor: () => import("./BackgroundColorPlugin.native-50iAT9xU.mjs").then((n) => n.BackgroundColorPlugin()),
9
9
  fontSize: () => import("./FontSizePlugin.native-B_jCh7dY.mjs").then((n) => n.FontSizePlugin()),
10
10
  fontFamily: () => import("./FontFamilyPlugin.native-j8hMTbg4.mjs").then((n) => n.FontFamilyPlugin()),
11
11
  lineHeight: () => import("./LineHeightPlugin.native-CM7iXdQj.mjs").then((n) => n.LineHeightPlugin()),
12
- capitalization: () => import("./CapitalizationPlugin.native-DOMsh5R7.mjs").then((n) => n.CapitalizationPlugin()),
12
+ capitalization: () => import("./CapitalizationPlugin.native-DLV4oPmB.mjs").then((n) => n.CapitalizationPlugin()),
13
13
  link: () => import("./LinkPlugin.native-DYCIcdTm.mjs").then((n) => n.LinkPlugin()),
14
14
  table: () => import("./TablePlugin.native-DrHX-efe.mjs").then((n) => n.TablePlugin()),
15
15
  trackChanges: () => import("./TrackChangesPlugin.native-Bghu2q4a.mjs").then((n) => n.TrackChangesPlugin()),
@@ -19,52 +19,52 @@ const r = {
19
19
  conditionalContent: () => import("./ConditionalContentPlugin.native-CfhY46rU.mjs").then((n) => n.ConditionalContentPlugin()),
20
20
  "conditional-content": () => import("./ConditionalContentPlugin.native-CfhY46rU.mjs").then((n) => n.ConditionalContentPlugin()),
21
21
  conditionalcontent: () => import("./ConditionalContentPlugin.native-CfhY46rU.mjs").then((n) => n.ConditionalContentPlugin()),
22
- dataBinding: () => import("./DataBindingPlugin.native-jQ1JPRTp.mjs").then((n) => n.DataBindingPlugin()),
23
- "data-binding": () => import("./DataBindingPlugin.native-jQ1JPRTp.mjs").then((n) => n.DataBindingPlugin()),
24
- databinding: () => import("./DataBindingPlugin.native-jQ1JPRTp.mjs").then((n) => n.DataBindingPlugin()),
25
- docSchema: () => import("./DocSchemaPlugin.native-CHOge18O.mjs").then((n) => n.DocSchemaPlugin()),
26
- "doc-schema": () => import("./DocSchemaPlugin.native-CHOge18O.mjs").then((n) => n.DocSchemaPlugin()),
27
- docschema: () => import("./DocSchemaPlugin.native-CHOge18O.mjs").then((n) => n.DocSchemaPlugin()),
28
- translationWorkflow: () => import("./TranslationWorkflowPlugin.native-Bz6jDGvj.mjs").then((n) => n.TranslationWorkflowPlugin()),
29
- "translation-workflow": () => import("./TranslationWorkflowPlugin.native-Bz6jDGvj.mjs").then((n) => n.TranslationWorkflowPlugin()),
30
- translationworkflow: () => import("./TranslationWorkflowPlugin.native-Bz6jDGvj.mjs").then((n) => n.TranslationWorkflowPlugin()),
31
- contentRules: () => import("./ContentRulesPlugin.native-nBLQ8QFZ.mjs").then((n) => n.ContentRulesPlugin()),
32
- "content-rules": () => import("./ContentRulesPlugin.native-nBLQ8QFZ.mjs").then((n) => n.ContentRulesPlugin()),
33
- contentrules: () => import("./ContentRulesPlugin.native-nBLQ8QFZ.mjs").then((n) => n.ContentRulesPlugin()),
34
- citations: () => import("./CitationsPlugin.native-BnU0qCwR.mjs").then((n) => n.CitationsPlugin()),
35
- citation: () => import("./CitationsPlugin.native-BnU0qCwR.mjs").then((n) => n.CitationsPlugin()),
36
- approvalWorkflow: () => import("./ApprovalWorkflowPlugin.native-C3jtAYjG.mjs").then((n) => n.ApprovalWorkflowPlugin()),
37
- "approval-workflow": () => import("./ApprovalWorkflowPlugin.native-C3jtAYjG.mjs").then((n) => n.ApprovalWorkflowPlugin()),
38
- approvalworkflow: () => import("./ApprovalWorkflowPlugin.native-C3jtAYjG.mjs").then((n) => n.ApprovalWorkflowPlugin()),
39
- piiRedaction: () => import("./PIIRedactionPlugin.native-DcsjmtV1.mjs").then((n) => n.PIIRedactionPlugin()),
40
- "pii-redaction": () => import("./PIIRedactionPlugin.native-DcsjmtV1.mjs").then((n) => n.PIIRedactionPlugin()),
41
- piiredaction: () => import("./PIIRedactionPlugin.native-DcsjmtV1.mjs").then((n) => n.PIIRedactionPlugin()),
42
- smartPaste: () => import("./SmartPastePlugin.native-BOKKtF07.mjs").then((n) => n.SmartPastePlugin()),
43
- "smart-paste": () => import("./SmartPastePlugin.native-BOKKtF07.mjs").then((n) => n.SmartPastePlugin()),
44
- smartpaste: () => import("./SmartPastePlugin.native-BOKKtF07.mjs").then((n) => n.SmartPastePlugin()),
45
- blocksLibrary: () => import("./BlocksLibraryPlugin.native-HMWKxWNs.mjs").then((n) => n.BlocksLibraryPlugin()),
46
- "blocks-library": () => import("./BlocksLibraryPlugin.native-HMWKxWNs.mjs").then((n) => n.BlocksLibraryPlugin()),
47
- blockslibrary: () => import("./BlocksLibraryPlugin.native-HMWKxWNs.mjs").then((n) => n.BlocksLibraryPlugin()),
22
+ dataBinding: () => import("./DataBindingPlugin.native-BoXwghTz.mjs").then((n) => n.DataBindingPlugin()),
23
+ "data-binding": () => import("./DataBindingPlugin.native-BoXwghTz.mjs").then((n) => n.DataBindingPlugin()),
24
+ databinding: () => import("./DataBindingPlugin.native-BoXwghTz.mjs").then((n) => n.DataBindingPlugin()),
25
+ docSchema: () => import("./DocSchemaPlugin.native-DUSVRHqT.mjs").then((n) => n.DocSchemaPlugin()),
26
+ "doc-schema": () => import("./DocSchemaPlugin.native-DUSVRHqT.mjs").then((n) => n.DocSchemaPlugin()),
27
+ docschema: () => import("./DocSchemaPlugin.native-DUSVRHqT.mjs").then((n) => n.DocSchemaPlugin()),
28
+ translationWorkflow: () => import("./TranslationWorkflowPlugin.native-DdF16tgT.mjs").then((n) => n.TranslationWorkflowPlugin()),
29
+ "translation-workflow": () => import("./TranslationWorkflowPlugin.native-DdF16tgT.mjs").then((n) => n.TranslationWorkflowPlugin()),
30
+ translationworkflow: () => import("./TranslationWorkflowPlugin.native-DdF16tgT.mjs").then((n) => n.TranslationWorkflowPlugin()),
31
+ contentRules: () => import("./ContentRulesPlugin.native-vPx5nC73.mjs").then((n) => n.ContentRulesPlugin()),
32
+ "content-rules": () => import("./ContentRulesPlugin.native-vPx5nC73.mjs").then((n) => n.ContentRulesPlugin()),
33
+ contentrules: () => import("./ContentRulesPlugin.native-vPx5nC73.mjs").then((n) => n.ContentRulesPlugin()),
34
+ citations: () => import("./CitationsPlugin.native-DQgoCd1B.mjs").then((n) => n.CitationsPlugin()),
35
+ citation: () => import("./CitationsPlugin.native-DQgoCd1B.mjs").then((n) => n.CitationsPlugin()),
36
+ approvalWorkflow: () => import("./ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs").then((n) => n.ApprovalWorkflowPlugin()),
37
+ "approval-workflow": () => import("./ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs").then((n) => n.ApprovalWorkflowPlugin()),
38
+ approvalworkflow: () => import("./ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs").then((n) => n.ApprovalWorkflowPlugin()),
39
+ piiRedaction: () => import("./PIIRedactionPlugin.native-g7j4jOmm.mjs").then((n) => n.PIIRedactionPlugin()),
40
+ "pii-redaction": () => import("./PIIRedactionPlugin.native-g7j4jOmm.mjs").then((n) => n.PIIRedactionPlugin()),
41
+ piiredaction: () => import("./PIIRedactionPlugin.native-g7j4jOmm.mjs").then((n) => n.PIIRedactionPlugin()),
42
+ smartPaste: () => import("./SmartPastePlugin.native-CZAEHkyt.mjs").then((n) => n.SmartPastePlugin()),
43
+ "smart-paste": () => import("./SmartPastePlugin.native-CZAEHkyt.mjs").then((n) => n.SmartPastePlugin()),
44
+ smartpaste: () => import("./SmartPastePlugin.native-CZAEHkyt.mjs").then((n) => n.SmartPastePlugin()),
45
+ blocksLibrary: () => import("./BlocksLibraryPlugin.native-5sdsXsiE.mjs").then((n) => n.BlocksLibraryPlugin()),
46
+ "blocks-library": () => import("./BlocksLibraryPlugin.native-5sdsXsiE.mjs").then((n) => n.BlocksLibraryPlugin()),
47
+ blockslibrary: () => import("./BlocksLibraryPlugin.native-5sdsXsiE.mjs").then((n) => n.BlocksLibraryPlugin()),
48
48
  mentions: () => import("./MentionPlugin.native-BMDlOqur.mjs").then((n) => n.MentionPlugin()),
49
49
  mention: () => import("./MentionPlugin.native-BMDlOqur.mjs").then((n) => n.MentionPlugin()),
50
50
  anchor: () => import("./AnchorPlugin.native-BcYGEtd9.mjs").then((n) => n.AnchorPlugin()),
51
- embedIframe: () => import("./EmbedIframePlugin.native-DKJx2OS7.mjs").then((n) => n.EmbedIframePlugin()),
52
- math: () => import("./MathPlugin.native-f_mDp8VL.mjs").then((n) => n.MathPlugin()),
53
- image: () => import("./MediaManagerPlugin.native-BiXiK8FC.mjs").then((n) => n.MediaManagerPlugin()),
54
- mergeTag: () => import("./MergeTagPlugin.native-C3eOfEgw.mjs").then((n) => n.MergeTagPlugin()),
51
+ embedIframe: () => import("./EmbedIframePlugin.native-BF_-LjTq.mjs").then((n) => n.EmbedIframePlugin()),
52
+ math: () => import("./MathPlugin.native-NwWPHVmj.mjs").then((n) => n.MathPlugin()),
53
+ image: () => import("./MediaManagerPlugin.native-eOsTJFpw.mjs").then((n) => n.MediaManagerPlugin()),
54
+ mergeTag: () => import("./MergeTagPlugin.native-BzRVoD9-.mjs").then((n) => n.MergeTagPlugin()),
55
55
  pageBreak: () => import("./PageBreakPlugin.native-DijGuHJZ.mjs").then((n) => n.PageBreakPlugin()),
56
56
  print: () => import("./PrintPlugin.native-7qt5v7L5.mjs").then((n) => n.PrintPlugin()),
57
57
  preview: () => import("./PreviewPlugin.native-WuIwOAOR.mjs").then((n) => n.PreviewPlugin()),
58
- specialCharacters: () => import("./SpecialCharactersPlugin.native-CZDato89.mjs").then((n) => n.SpecialCharactersPlugin()),
59
- slashCommands: () => import("./SlashCommandsPlugin.native-CmxvMEaE.mjs").then((n) => n.SlashCommandsPlugin()),
60
- "slash-commands": () => import("./SlashCommandsPlugin.native-CmxvMEaE.mjs").then((n) => n.SlashCommandsPlugin()),
58
+ specialCharacters: () => import("./SpecialCharactersPlugin.native-DaG4b19I.mjs").then((n) => n.SpecialCharactersPlugin()),
59
+ slashCommands: () => import("./SlashCommandsPlugin.native-BiN6ODw5.mjs").then((n) => n.SlashCommandsPlugin()),
60
+ "slash-commands": () => import("./SlashCommandsPlugin.native-BiN6ODw5.mjs").then((n) => n.SlashCommandsPlugin()),
61
61
  spellCheck: () => import("./SpellCheckPlugin.native-BZB9AewP.mjs").then((n) => n.SpellCheckPlugin()),
62
62
  emojis: () => import("./EmojisPlugin.native-CitxxlWX.mjs").then((n) => n.EmojisPlugin()),
63
63
  a11yChecker: () => import("./A11yCheckerPlugin.native-BRdGYMju.mjs").then((n) => n.A11yCheckerPlugin()),
64
64
  comments: () => import("./CommentsPlugin.native-DPSqTkiv.mjs").then((n) => n.CommentsPlugin()),
65
65
  "document-manager": () => import("./DocumentManagerPlugin.native-C2cs_1w4.mjs").then((n) => n.DocumentManagerPlugin()),
66
66
  fullscreen: () => import("./FullscreenPlugin.native-ChXyxeNw.mjs").then((n) => n.FullscreenPlugin()),
67
- template: () => import("./TemplatePlugin.native-CrpfKRJ8.mjs").then((n) => n.TemplatePlugin()),
67
+ template: () => import("./TemplatePlugin.native-DLjFUaPW.mjs").then((n) => n.TemplatePlugin()),
68
68
  footnote: () => import("./FootnotePlugin.native-D730OGRm.mjs").then((n) => n.FootnotePlugin())
69
69
  };
70
70
  async function a(n) {
@@ -1156,6 +1156,7 @@ const q = [
1156
1156
  "img",
1157
1157
  "video",
1158
1158
  "audio",
1159
+ "iframe",
1159
1160
  "table",
1160
1161
  "thead",
1161
1162
  "tbody",
@@ -1172,11 +1173,12 @@ const q = [
1172
1173
  "sub",
1173
1174
  "hr"
1174
1175
  ], V = {
1175
- "*": ["class", "style", "id", "data-*", "role", "aria-*", "tabindex", "contenteditable", "spellcheck"],
1176
+ "*": ["class", "style", "id", "data-*", "role", "aria-*", "tabindex", "contenteditable", "spellcheck", "dir", "lang"],
1176
1177
  a: ["href", "target", "rel", "title"],
1177
1178
  img: ["src", "alt", "width", "height", "loading"],
1178
1179
  video: ["src", "controls", "width", "height", "autoplay", "loop", "muted"],
1179
1180
  audio: ["src", "controls", "autoplay", "loop", "muted"],
1181
+ iframe: ["src", "width", "height", "name", "title", "longdesc", "allow", "allowfullscreen", "frameborder", "scrolling", "loading", "referrerpolicy"],
1180
1182
  table: ["border", "cellpadding", "cellspacing"],
1181
1183
  td: ["colspan", "rowspan", "align", "valign"],
1182
1184
  th: ["colspan", "rowspan", "align", "valign"]
@@ -1215,7 +1217,7 @@ function G(a, t) {
1215
1217
  break;
1216
1218
  }
1217
1219
  }
1218
- (l.startsWith("on") || l === "javascript:" || l === "href" && s.value.trim().toLowerCase().startsWith("javascript:") || l === "src" && s.value.trim().toLowerCase().startsWith("javascript:")) && (c = !1), c || a.removeAttribute(s.name);
1220
+ (l.startsWith("on") || l === "javascript:" || l === "href" && s.value.trim().toLowerCase().startsWith("javascript:") || l === "src" && s.value.trim().toLowerCase().startsWith("javascript:")) && (c = !1), l === "dir" && !["ltr", "rtl", "auto"].includes(s.value.trim().toLowerCase()) && (c = !1), c || a.removeAttribute(s.name);
1219
1221
  }
1220
1222
  a.hasAttribute("href") && (a.getAttribute("href") || "").trim().toLowerCase().startsWith("javascript:") && a.removeAttribute("href"), a.hasAttribute("src") && (a.getAttribute("src") || "").trim().toLowerCase().startsWith("javascript:") && a.removeAttribute("src");
1221
1223
  }
@@ -1467,11 +1469,11 @@ S.EDITOR_DEFAULTS = {
1467
1469
  },
1468
1470
  statusbar: !1
1469
1471
  };
1470
- let w = S;
1472
+ let x = S;
1471
1473
  const J = '.editora-editor{display:flex;flex-direction:column;border:1px solid #ddd;border-radius:4px;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;overflow:hidden}.editora-editor *{box-sizing:border-box}.editora-theme-light{background:#fff;color:#333}.editora-theme-dark{--editora-dark-toolbar-bg-start: #353d48;--editora-dark-toolbar-bg-end: #2d3540;--editora-dark-button-bg-start: #46505f;--editora-dark-button-bg-end: #3b4553;--editora-dark-button-hover-start: #525d6d;--editora-dark-button-hover-end: #465262;--editora-dark-button-active-start: #5eaaf6;--editora-dark-button-active-end: #4a95de;--editora-dark-border: #475263;--editora-dark-border-strong: #566275;--editora-dark-text: #e1e9f5;--editora-dark-text-strong: #f3f7ff;--editora-dark-text-muted: #aeb9cc;--editora-dark-surface: #1d242d;--editora-dark-content: #1f2732;background:linear-gradient(180deg,#1b2330,#1c2430);color:var(--editora-dark-text);border-color:var(--editora-dark-border)}.editora-toolbar{display:flex;align-items:center;gap:4px;padding:8px;background:#f5f5f5;border-bottom:1px solid #ddd;flex-wrap:wrap}.editora-theme-dark .editora-toolbar{background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%);border-bottom-color:var(--editora-dark-border);box-shadow:inset 0 1px #ffffff0d}.editora-toolbar-sticky{position:sticky;top:0;z-index:100;position:-webkit-sticky}.editora-toolbar-group{display:flex;align-items:center;gap:2px}.editora-toolbar-button{padding:6px 12px;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-weight:600;font-size:14px;height:30px;display:flex;align-items:center;white-space:nowrap}.editora-toolbar-group-button{display:flex;align-items:center}.editora-toolbar-input.font-size{width:40px;padding:.25rem;text-align:center;font-size:14px;background:#fff;border:1px solid var(--rte-color-border-light);border-radius:var(--rte-radius-sm)}.editora-toolbar-group-items{display:flex;align-items:center;border:1px solid #ccc;.editora-toolbar-button{border:none;border-radius:0;&:first-child{border-right:1px solid #ccc;border-top-left-radius:3px;border-bottom-left-radius:3px}&:last-child{border:0px solid #ccc;border-radius:0!important}&:hover{background:#e0e0e0;border-color:#ccc}}}.editora-theme-dark .editora-toolbar-button{background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%);border-color:var(--editora-dark-border-strong);color:var(--editora-dark-text);box-shadow:inset 0 1px #ffffff14,0 1px 1px #00000059}.editora-theme-dark .editora-toolbar-group-items{border-color:var(--editora-dark-border-strong);background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%)}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:first-child{border-right-color:#566275}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:last-child{border-left-color:#566275}.editora-theme-dark .editora-toolbar-input.font-size{background-color:#2e3642;color:var(--editora-dark-text-strong);border-color:var(--editora-dark-border-strong);caret-color:var(--editora-dark-text-strong)}.editora-theme-dark .editora-toolbar-input.font-size::placeholder{color:var(--editora-dark-text-strong);opacity:1}.editora-toolbar-button:hover{background:#e0e0e0;border-color:#ccc}.editora-theme-dark .editora-toolbar-button:hover{background:linear-gradient(180deg,var(--editora-dark-button-hover-start) 0%,var(--editora-dark-button-hover-end) 100%);border-color:#66748a;color:var(--editora-dark-text-strong)}.editora-toolbar-button:active,.editora-toolbar-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-button:active,.editora-theme-dark .editora-toolbar-button.active{background:linear-gradient(180deg,var(--editora-dark-button-active-start) 0%,var(--editora-dark-button-active-end) 100%);border-color:#67adf4;color:#0f1b2a}.editora-theme-dark .editora-toolbar-button:disabled{background:#313946;border-color:#424d5e;color:#7f8ca1}.editora-theme-dark .editora-toolbar-button[data-command=insertTable],.editora-theme-dark .editora-toolbar-button[data-command=print],.editora-theme-dark .editora-toolbar-button[data-command=toggleSpellCheck],.editora-theme-dark .editora-toolbar-button[data-command=toggleA11yChecker],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionLTR],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionRTL]{color:#f1f6ff}.editora-toolbar-button:disabled{opacity:.5;cursor:not-allowed}.editora-toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;line-height:1}.editora-toolbar-button svg,.editora-toolbar-icon svg{width:20px;height:20px;display:block;color:currentColor;fill:currentColor}.editora-theme-dark .editora-toolbar-icon,.editora-theme-dark .editora-toolbar-icon *{color:inherit}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([stroke="#000" i],[stroke="#000000" i],[stroke=black i],[stroke="#0f0f0f" i],[stroke="#111111" i],[style*="stroke:#000" i],[style*="stroke: #000" i],[style*="stroke:black" i],[style*="stroke: black" i],[style*="stroke:#0f0f0f" i],[style*="stroke: #0f0f0f" i]){stroke:currentColor!important}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([fill="#000" i],[fill="#000000" i],[fill=black i],[fill="#0f0f0f" i],[fill="#111111" i],[style*="fill:#000" i],[style*="fill: #000" i],[style*="fill:black" i],[style*="fill: black" i],[style*="fill:#0f0f0f" i],[style*="fill: #0f0f0f" i]){fill:currentColor!important}.editora-toolbar-separator{width:1px;height:24px;background:#ddd;margin:0 4px}.editora-theme-dark .editora-toolbar-separator{background:#4d596b}.editora-toolbar-dropdown{position:relative}.editora-toolbar-dropdown-menu{position:absolute;top:100%;left:0;min-width:150px;margin-top:4px;padding:4px 0;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-toolbar-dropdown-menu{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;color:#333;text-align:left;cursor:pointer;font-size:13px;transition:background .15s ease}.editora-theme-dark .editora-toolbar-dropdown-item{color:#d7deea}.editora-toolbar-dropdown-item:hover{background:#f5f5f5}.editora-theme-dark .editora-toolbar-dropdown-item:hover{background:#3a4554;color:#f0f6ff}.editora-content{flex:1;min-height:200px;padding:16px;outline:none;overflow-y:auto;line-height:1.6}.editora-theme-dark .editora-content{color:#ecf3ff;background:linear-gradient(180deg,var(--editora-dark-content) 0%,#1c232e 100%)}.editora-content:empty:before{content:attr(data-placeholder);color:#999;pointer-events:none}.editora-theme-dark .editora-content:empty:before{color:#8f9bb0}.editora-content h1{font-size:2em;margin:.67em 0;font-weight:600}.editora-content h2{font-size:1.5em;margin:.75em 0;font-weight:600}.editora-content h3{font-size:1.17em;margin:.83em 0;font-weight:600}.editora-content p{margin:1em 0}.editora-theme-dark .editora-content,.editora-theme-dark .editora-content :is(p,span,div,li,ul,ol,td,th,h1,h2,h3,h4,h5,h6,strong,em,u,s,small,sub,sup,blockquote,code,pre,a){color:#ecf3ff}.editora-content ul,.editora-content ol{margin:1em 0;padding-left:2em}.editora-content a{color:#06c;text-decoration:underline}.editora-theme-dark .editora-content a{color:#ecf3ff}.editora-content code{padding:2px 4px;background:#f5f5f5;border-radius:3px;font-family:Monaco,Menlo,Consolas,monospace;font-size:.9em}.editora-theme-dark .editora-content code{background:#1e1e1e}.editora-content pre{padding:12px;background:#f5f5f5;border-radius:4px;overflow-x:auto;margin:1em 0}.editora-theme-dark .editora-content pre{background:#1e1e1e}.editora-theme-dark .rte-code-block{background:linear-gradient(180deg,#212a36,#1b2430)!important;border-color:#4f5b70!important;color:#e7effc!important}.editora-theme-dark .rte-code-block code{color:#e7effc!important}.editora-theme-dark .rte-code-block:before{background:#111927!important;color:#dce8ff!important}.editora-theme-dark .rte-code-block .rte-code-copy{background:#2b3441!important;border-color:#5a667b!important;color:#dce8ff!important}.editora-content blockquote{margin:1em 0;padding-left:1em;border-left:4px solid #ddd;color:#666}.editora-theme-dark .editora-content blockquote{border-left-color:#3c3c3c;color:#ecf3ff}.editora-floating-toolbar{position:absolute;padding:4px;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-floating-toolbar{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-statusbar-container{display:flex;flex-direction:column}.editora-statusbar-left{display:flex;align-items:center;gap:8px}.editora-statusbar-right{display:flex;align-items:center;gap:8px;margin-left:auto}.editora-statusbar{display:flex;align-items:center;gap:12px;padding:6px 12px;background:#f5f5f5;border-top:1px solid #ddd;font-size:12px;color:#666}.editora-theme-dark .editora-statusbar{background:linear-gradient(180deg,#2c3440,#252d37);border-top-color:#3f4a5b;color:#d7deea}.editora-statusbar-item{white-space:nowrap}.editora-statusbar-separator{color:#ddd}.editora-theme-dark .editora-statusbar-separator{color:#566275}.editora-editor[readonly] .editora-content{background:#fafafa;cursor:not-allowed}.editora-theme-dark.editora-editor[readonly] .editora-content{background:#1a1a1a}.editora-editor:focus-within{border-color:#06c;box-shadow:0 0 0 3px #0066cc1a}.editora-theme-dark.editora-editor:focus-within{border-color:#4db8ff;box-shadow:0 0 0 3px #4db8ff1a}.editora-editor[disabled]{opacity:.6;pointer-events:none}@media(max-width:768px){.editora-toolbar{padding:4px}.editora-toolbar-button{min-width:28px;min-height:28px;padding:4px 8px;font-size:12px}.editora-content{padding:12px}}.editora-content ::selection{background:#06c3}.editora-theme-dark .editora-content ::selection{background:#4db8ff33}.editora-content table{border-collapse:collapse;width:100%;margin:1em 0}.editora-content th,.editora-content td{border:1px solid #ddd;padding:8px 12px;text-align:left}.editora-theme-dark .editora-content th,.editora-theme-dark .editora-content td{border-color:#3c3c3c}.editora-content th{background:#f5f5f5;font-weight:600}.editora-theme-dark .editora-content th{background:#252526}.editora-content img{max-width:100%;height:auto;border-radius:4px;display:block}.editora-content video{max-width:100%;height:auto;border-radius:4px;display:block}.editora-editor.loading{opacity:.7;pointer-events:none}.editora-editor.loading:after{content:"";position:absolute;top:50%;left:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border:3px solid #ddd;border-top-color:#06c;border-radius:50%;animation:editora-spin .8s linear infinite}@keyframes editora-spin{to{transform:rotate(360deg)}}.toolbar-container-wrapper{display:flex;align-items:center;background:#fff;border-bottom:1px solid #e0e0e0;padding:0;margin:0;width:100%;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.5;position:relative}.toolbar-container-wrapper[data-toolbar-sticky=true]{position:sticky;top:0;z-index:999;box-shadow:0 2px 4px #0000001a}.toolbar-container-wrapper[data-toolbar-floating=true]{position:fixed;top:0;left:0;right:0;z-index:1000;box-shadow:0 4px 12px #00000026}.toolbar-container-wrapper[data-toolbar-position=bottom]{border-bottom:none;border-top:1px solid #e0e0e0}.toolbar-container-wrapper .toolbar-wrapper{display:flex;width:100%;padding:8px;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar{display:flex;width:100%;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar-container{display:flex;gap:4px;flex-wrap:wrap;align-items:center;flex:1;position:relative}.toolbar-container-wrapper .toolbar-item{display:flex;align-items:center;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:6px 10px;border:1px solid #d1d5db;background:#fff;border-radius:4px;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;gap:4px;transition:all .15s ease;min-height:32px;white-space:nowrap}.toolbar-container-wrapper .toolbar-button:hover{background-color:#f3f4f6;border-color:#9ca3af}.toolbar-container-wrapper .toolbar-button:active,.toolbar-container-wrapper .toolbar-button[data-active=true]{background-color:#06c;color:#fff;border-color:#0052a3;box-shadow:inset 0 1px 3px #0000001a}.toolbar-container-wrapper .toolbar-button:disabled{opacity:.5;cursor:not-allowed;background-color:#f9fafb}.toolbar-container-wrapper .toolbar-more-button{padding:6px 8px;font-size:16px;font-weight:500;line-height:1}.toolbar-container-wrapper .toolbar-separator{width:1px;height:24px;background-color:#d1d5db;margin:0 4px}.toolbar-container-wrapper .toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0}.toolbar-container-wrapper .toolbar-icon svg{width:100%;height:100%}.toolbar-container-wrapper .toolbar-dropdown{position:relative;display:flex;align-items:center}.toolbar-container-wrapper .toolbar-dropdown-arrow{font-size:10px;margin-left:2px;line-height:1}.toolbar-container-wrapper .toolbar-dropdown-menu{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:6px;box-shadow:0 4px 12px #00000026;z-index:1000;min-width:160px;padding:4px 0;margin-top:4px;display:none}.toolbar-container-wrapper .toolbar-dropdown-menu.show{display:block}.toolbar-container-wrapper .toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;text-align:left;cursor:pointer;font-size:13px;color:#1f2937;transition:background-color .15s ease;font-family:inherit}.toolbar-container-wrapper .toolbar-dropdown-item:hover{background-color:#f3f4f6}.toolbar-container-wrapper .toolbar-dropdown-item:active{background-color:#e5e7eb}.toolbar-container-wrapper .toolbar-input{padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:13px;font-family:inherit;background-color:#fff;color:#1f2937;transition:all .15s ease}.toolbar-container-wrapper .toolbar-input:focus{outline:none;border-color:#06c;box-shadow:0 0 0 3px #0066cc1a;background-color:#fff}.toolbar-container-wrapper .toolbar-input::placeholder{color:#9ca3af}.toolbar-overflow-menu{animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.toolbar-overflow-item{transition:background-color .15s ease}.floating-toolbar{user-select:none;-webkit-user-select:none;font-family:system-ui,-apple-system,sans-serif;font-size:14px;animation:fadeInUp .15s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.floating-toolbar-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:4px;color:#495057;cursor:pointer;font-size:14px;font-weight:500;transition:all .15s ease;outline:none}.floating-toolbar-btn:hover{background:#f8f9fa;color:#212529}.floating-toolbar-btn:active{background:#e9ecef;transform:scale(.95)}.floating-toolbar-btn.floating-toolbar-toggle{color:#dc3545;font-weight:700}.floating-toolbar-btn.floating-toolbar-toggle:hover{background:#f8d7da;color:#721c24}.floating-toolbar-separator{width:1px;height:20px;background:#e1e5e9;margin:0 2px}@media(max-width:768px){.toolbar-container-wrapper .toolbar-button{padding:5px 8px;font-size:12px;min-height:28px}.toolbar-container-wrapper .toolbar-icon{width:16px;height:16px}.toolbar-container-wrapper .toolbar-dropdown-menu{min-width:140px}.toolbar-container-wrapper .toolbar-dropdown-item{padding:6px 10px;font-size:12px}.floating-toolbar{padding:4px;gap:2px}.floating-toolbar-btn{width:28px;height:28px;font-size:12px}}@media(max-width:480px){.toolbar-container-wrapper{padding:4px}.toolbar-container-wrapper .toolbar-wrapper{padding:4px;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:4px 6px;font-size:11px;min-height:24px}.toolbar-container-wrapper .toolbar-icon{width:14px;height:14px}}.floating-toolbar{pointer-events:auto}.floating-toolbar{max-width:calc(100vw - 20px);overflow-x:auto}@media(prefers-color-scheme:dark){.floating-toolbar{background:#2d3748;border-color:#4a5568;color:#e2e8f0}.floating-toolbar-btn:hover{background:#4a5568;color:#f7fafc}.floating-toolbar-btn:active{background:#718096}.floating-toolbar-separator{background:#4a5568}}';
1472
1474
  let y;
1473
1475
  const Q = "__editoraCommandEditorRoot", Z = "__editoraLastCommandButton", T = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", A = ".rte-content, .editora-content", C = /* @__PURE__ */ new Set();
1474
- let m = null, L = !1, k = null, x = null;
1476
+ let m = null, L = !1, k = null, w = null;
1475
1477
  function M(a) {
1476
1478
  if (!(a instanceof HTMLElement)) return !1;
1477
1479
  const t = a;
@@ -1523,10 +1525,10 @@ function et() {
1523
1525
  }
1524
1526
  function ot() {
1525
1527
  if (typeof window == "undefined" || L) return;
1526
- k = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, x = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
1528
+ k = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, w = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
1527
1529
  const a = (t, e) => {
1528
1530
  const o = et();
1529
- return o ? o.execCommand(t, e) : k ? k(t, e) : x ? x(t, e) : !1;
1531
+ return o ? o.execCommand(t, e) : k ? k(t, e) : w ? w(t, e) : !1;
1530
1532
  };
1531
1533
  window.executeEditorCommand = a, window.execEditorCommand = a, L = !0;
1532
1534
  }
@@ -2245,7 +2247,7 @@ class g extends HTMLElement {
2245
2247
  const o = this.attributes[e];
2246
2248
  t[o.name] = o.value;
2247
2249
  }
2248
- return w.resolve({
2250
+ return x.resolve({
2249
2251
  jsConfig: this.jsConfig,
2250
2252
  attributes: t
2251
2253
  });
@@ -2312,16 +2314,16 @@ const E = new I();
2312
2314
  g.__globalPluginLoader = E;
2313
2315
  const rt = {
2314
2316
  // Core editing plugins (always loaded)
2315
- bold: () => import("./BoldPlugin.native-BAzzoqU5.mjs").then((a) => a.BoldPlugin()),
2316
- italic: () => import("./ItalicPlugin.native-CQjjDyUL.mjs").then((a) => a.ItalicPlugin()),
2317
- underline: () => import("./UnderlinePlugin.native-QpIcK4L2.mjs").then((a) => a.UnderlinePlugin()),
2318
- strikethrough: () => import("./StrikethroughPlugin.native-0Be7j49s.mjs").then((a) => a.StrikethroughPlugin()),
2319
- clearFormatting: () => import("./ClearFormattingPlugin.native-Bq_XcTh2.mjs").then((a) => a.ClearFormattingPlugin()),
2320
- heading: () => import("./HeadingPlugin.native-DrLYwQnQ.mjs").then((a) => a.HeadingPlugin()),
2321
- blockquote: () => import("./BlockquotePlugin.native-JFmOLsxN.mjs").then((a) => a.BlockquotePlugin()),
2322
- code: () => import("./CodePlugin.native-DlpTPdkd.mjs").then((a) => a.CodePlugin()),
2317
+ bold: () => import("./BoldPlugin.native-CSh_LiIJ.mjs").then((a) => a.BoldPlugin()),
2318
+ italic: () => import("./ItalicPlugin.native-CmnlwFHB.mjs").then((a) => a.ItalicPlugin()),
2319
+ underline: () => import("./UnderlinePlugin.native-DZzg23rv.mjs").then((a) => a.UnderlinePlugin()),
2320
+ strikethrough: () => import("./StrikethroughPlugin.native-V0TL4F48.mjs").then((a) => a.StrikethroughPlugin()),
2321
+ clearFormatting: () => import("./ClearFormattingPlugin.native-DIS6AN2t.mjs").then((a) => a.ClearFormattingPlugin()),
2322
+ heading: () => import("./HeadingPlugin.native-DZdvubrQ.mjs").then((a) => a.HeadingPlugin()),
2323
+ blockquote: () => import("./BlockquotePlugin.native-57_Xcjl1.mjs").then((a) => a.BlockquotePlugin()),
2324
+ code: () => import("./CodePlugin.native-C5l1IeSS.mjs").then((a) => a.CodePlugin()),
2323
2325
  list: () => import("./ListPlugin.native-V7EZC1lM.mjs").then((a) => a.ListPlugin()),
2324
- history: () => import("./HistoryPlugin.native-TDnVMsEO.mjs").then((a) => a.HistoryPlugin())
2326
+ history: () => import("./HistoryPlugin.native-D2wl32jV.mjs").then((a) => a.HistoryPlugin())
2325
2327
  };
2326
2328
  async function at() {
2327
2329
  return Object.entries(rt).forEach(([a, t]) => {