@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.
- package/README.md +5 -0
- package/dist/{A11yCheckerPlugin.native-BRdGYMju.mjs → A11yCheckerPlugin.native-58d12bed.mjs} +23 -12
- package/dist/{AnchorPlugin.native-BcYGEtd9.mjs → AnchorPlugin.native-289a112a.mjs} +112 -102
- package/dist/ApprovalWorkflowPlugin.native-449ce66c.mjs +1115 -0
- package/dist/{BackgroundColorPlugin.native-50iAT9xU.mjs → BackgroundColorPlugin.native-8aceb5cc.mjs} +16 -9
- package/dist/{BlockquotePlugin.native-JFmOLsxN.mjs → BlockquotePlugin.native-3541c714.mjs} +3 -2
- package/dist/BlocksLibraryPlugin.native-1cc51e63.mjs +1386 -0
- package/dist/{BoldPlugin.native-BAzzoqU5.mjs → BoldPlugin.native-f9d7f8e4.mjs} +1 -1
- package/dist/{CapitalizationPlugin.native-DOMsh5R7.mjs → CapitalizationPlugin.native-42c135dc.mjs} +3 -2
- package/dist/{ChecklistPlugin.native-nuSSEFNI.mjs → ChecklistPlugin.native-3b397ee9.mjs} +43 -22
- package/dist/CitationsPlugin.native-169fb1e8.mjs +1532 -0
- package/dist/{ClearFormattingPlugin.native-Bq_XcTh2.mjs → ClearFormattingPlugin.native-77baa514.mjs} +11 -6
- package/dist/{CodePlugin.native-DlpTPdkd.mjs → CodePlugin.native-989cf0aa.mjs} +629 -580
- package/dist/{CodeSamplePlugin.native-CgGoH-X4.mjs → CodeSamplePlugin.native-6cc0148e.mjs} +19 -10
- package/dist/{CommentsPlugin.native-DPSqTkiv.mjs → CommentsPlugin.native-03659874.mjs} +55 -28
- package/dist/ConditionalContentPlugin.native-4983143a.mjs +1424 -0
- package/dist/ContentRulesPlugin.native-63ed405b.mjs +1149 -0
- package/dist/DataBindingPlugin.native-427e9d75.mjs +956 -0
- package/dist/{DirectionPlugin.native-CDnbdNyl.mjs → DirectionPlugin.native-4e742f42.mjs} +19 -10
- package/dist/DocSchemaPlugin.native-8e41eda0.mjs +1382 -0
- package/dist/{DocumentManagerPlugin.native-C2cs_1w4.mjs → DocumentManagerPlugin.native-e69895ad.mjs} +4 -4
- package/dist/{EmbedIframePlugin.native-DKJx2OS7.mjs → EmbedIframePlugin.native-55209c87.mjs} +70 -70
- package/dist/{EmojisPlugin.native-CitxxlWX.mjs → EmojisPlugin.native-65c5ac47.mjs} +11 -6
- package/dist/{FontFamilyPlugin.native-j8hMTbg4.mjs → FontFamilyPlugin.native-f9bc255a.mjs} +7 -4
- package/dist/{FontSizePlugin.native-B_jCh7dY.mjs → FontSizePlugin.native-f5647872.mjs} +19 -10
- package/dist/{FootnotePlugin.native-D730OGRm.mjs → FootnotePlugin.native-494657b3.mjs} +77 -39
- package/dist/{FullscreenPlugin.native-ChXyxeNw.mjs → FullscreenPlugin.native-87ce92e9.mjs} +1 -1
- package/dist/{HeadingPlugin.native-DrLYwQnQ.mjs → HeadingPlugin.native-e38c4a16.mjs} +1 -1
- package/dist/{HistoryPlugin.native-TDnVMsEO.mjs → HistoryPlugin.native-92ed4be4.mjs} +43 -22
- package/dist/{IndentPlugin.native-BHixp8sP.mjs → IndentPlugin.native-e4ee902b.mjs} +23 -12
- package/dist/{ItalicPlugin.native-CQjjDyUL.mjs → ItalicPlugin.native-7c95cfbc.mjs} +1 -1
- package/dist/{LineHeightPlugin.native-CM7iXdQj.mjs → LineHeightPlugin.native-5668f78c.mjs} +19 -10
- package/dist/{LinkPlugin.native-DYCIcdTm.mjs → LinkPlugin.native-6df29111.mjs} +9 -5
- package/dist/{ListPlugin.native-V7EZC1lM.mjs → ListPlugin.native-fe2e115a.mjs} +9 -5
- package/dist/{MathPlugin.native-f_mDp8VL.mjs → MathPlugin.native-735bbac2.mjs} +9 -5
- package/dist/{MediaManagerPlugin.native-BiXiK8FC.mjs → MediaManagerPlugin.native-3cf48a00.mjs} +219 -207
- package/dist/MentionPlugin.native-3b1e8c05.mjs +778 -0
- package/dist/{MergeTagPlugin.native-C3eOfEgw.mjs → MergeTagPlugin.native-31cf7d48.mjs} +51 -26
- package/dist/PIIRedactionPlugin.native-7ab10b9f.mjs +1449 -0
- package/dist/{PageBreakPlugin.native-CXdX5fAv.mjs → PageBreakPlugin.native-1794c5fb.mjs} +67 -52
- package/dist/{PreviewPlugin.native-DBvfpmIv.mjs → PreviewPlugin.native-f7b67cc0.mjs} +38 -33
- package/dist/{PrintPlugin.native-7qt5v7L5.mjs → PrintPlugin.native-f6a168c2.mjs} +5 -3
- package/dist/SlashCommandsPlugin.native-8d45e511.mjs +790 -0
- package/dist/SmartPastePlugin.native-a6c5efec.mjs +1447 -0
- package/dist/{SpecialCharactersPlugin.native-CZDato89.mjs → SpecialCharactersPlugin.native-7f06d4ba.mjs} +17 -9
- package/dist/{SpellCheckPlugin.native-BZB9AewP.mjs → SpellCheckPlugin.native-04e20834.mjs} +41 -21
- package/dist/{StrikethroughPlugin.native-0Be7j49s.mjs → StrikethroughPlugin.native-905e9501.mjs} +9 -5
- package/dist/{TablePlugin.native-DrHX-efe.mjs → TablePlugin.native-7d5458c1.mjs} +58 -30
- package/dist/{TemplatePlugin.native-CrpfKRJ8.mjs → TemplatePlugin.native-580f0f63.mjs} +32 -17
- package/dist/{TextAlignmentPlugin.native-sM_1s00t.mjs → TextAlignmentPlugin.native-9357b3ed.mjs} +11 -6
- package/dist/{TextColorPlugin.native-Bwl_bSmc.mjs → TextColorPlugin.native-d53ed459.mjs} +26 -14
- package/dist/TrackChangesPlugin.native-e96da509.mjs +818 -0
- package/dist/TranslationWorkflowPlugin.native-4e711b1e.mjs +1797 -0
- package/dist/{UnderlinePlugin.native-QpIcK4L2.mjs → UnderlinePlugin.native-8080c998.mjs} +1 -1
- package/dist/VersionDiffPlugin.native-5bbeff85.mjs +801 -0
- package/dist/_commonjsHelpers-69d58be2.mjs +31 -0
- package/dist/{anchoredPopover-Bxds0VoB.mjs → anchoredPopover-5cca53ba.mjs} +1 -1
- package/dist/documentManager-8327fb6e.mjs +9166 -0
- package/dist/{editorContainerHelpers-C7kdWnS0.mjs → editorContainerHelpers-69585c07.mjs} +3 -2
- package/dist/editora.min.js +14 -13
- package/dist/editora.umd.js +14 -13
- package/dist/{html2canvas.esm-AYkPY5LS.mjs → html2canvas.esm-c51cb3b9.mjs} +978 -894
- package/dist/index-072ef022.js +11 -0
- package/dist/index-49d31221.mjs +16860 -0
- package/dist/{index-yzU4NdPT.mjs → index-7da30697.mjs} +490 -358
- package/dist/index.cjs.js +1 -1
- package/dist/index.es-b47a189f.mjs +5782 -0
- package/dist/index.esm.js +12 -7
- package/dist/{jspdf.es.min-BJGtOnRT.mjs → jspdf.es.min-780c82db.mjs} +4808 -3784
- package/dist/plugin-loader.js +77 -40
- package/dist/{purify.es-CKpwg8Tk.mjs → purify.es-3bdbcfc5.mjs} +20 -10
- package/dist/style.css +1 -0
- package/dist/webcomponent-core.js +546 -414
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +40 -39
- package/dist/webcomponent.cjs.js +1 -1
- package/dist/webcomponent.esm.js +1 -1
- package/dist/webcomponent.js +484 -315
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +6035 -558
- package/package.json +11 -5
- package/dist/_commonjsHelpers-DOllISpa.mjs +0 -32
- package/dist/core.css +0 -1
- package/dist/documentManager-vQ1VkbUY.mjs +0 -8418
- package/dist/index-BpE6GFbz.js +0 -10
- package/dist/index-BslAFzmv.mjs +0 -16544
- package/dist/index.es-BYD2KEo6.mjs +0 -6666
|
@@ -441,16 +441,19 @@ const m = {
|
|
|
441
441
|
let v = !1;
|
|
442
442
|
const E = '[data-theme="dark"], .dark, .editora-theme-dark', w = () => {
|
|
443
443
|
const a = window.getSelection();
|
|
444
|
-
if (!a || a.rangeCount === 0)
|
|
444
|
+
if (!a || a.rangeCount === 0)
|
|
445
|
+
return null;
|
|
445
446
|
const e = a.anchorNode, t = e instanceof HTMLElement ? e : e == null ? void 0 : e.parentElement;
|
|
446
447
|
return (t == null ? void 0 : t.closest(".rte-content, .editora-content")) || null;
|
|
447
448
|
}, z = (a) => {
|
|
448
449
|
const e = a || w();
|
|
449
450
|
return e ? !!e.closest(E) : !1;
|
|
450
451
|
}, C = () => {
|
|
451
|
-
if (typeof document == "undefined")
|
|
452
|
+
if (typeof document == "undefined")
|
|
453
|
+
return;
|
|
452
454
|
const a = "special-characters-plugin-styles";
|
|
453
|
-
if (document.getElementById(a))
|
|
455
|
+
if (document.getElementById(a))
|
|
456
|
+
return;
|
|
454
457
|
const e = document.createElement("style");
|
|
455
458
|
e.id = a, e.textContent = `
|
|
456
459
|
.special-characters-overlay {
|
|
@@ -728,7 +731,8 @@ const E = '[data-theme="dark"], .dark, .editora-theme-dark', w = () => {
|
|
|
728
731
|
t.insertNode(c), t.setStartAfter(c), t.setEndAfter(c), e.removeAllRanges(), e.addRange(t);
|
|
729
732
|
}
|
|
730
733
|
}, S = (a) => {
|
|
731
|
-
if (typeof window == "undefined" || v)
|
|
734
|
+
if (typeof window == "undefined" || v)
|
|
735
|
+
return;
|
|
732
736
|
v = !0, C();
|
|
733
737
|
let e = "all", t = "", c = null;
|
|
734
738
|
const i = document.createElement("div");
|
|
@@ -760,7 +764,8 @@ const E = '[data-theme="dark"], .dark, .editora-theme-dark', w = () => {
|
|
|
760
764
|
</div>
|
|
761
765
|
`;
|
|
762
766
|
const l = s.querySelector(".special-characters-tabs"), n = s.querySelector(".special-characters-grid"), d = s.querySelector(".special-characters-search-input"), u = s.querySelector(".special-characters-close"), y = () => m[e].characters.filter((r) => {
|
|
763
|
-
if (!t.trim())
|
|
767
|
+
if (!t.trim())
|
|
768
|
+
return !0;
|
|
764
769
|
const o = t.toLowerCase();
|
|
765
770
|
return r.toLowerCase().includes(o) || (k[r] || "").toLowerCase().includes(o);
|
|
766
771
|
}), f = () => {
|
|
@@ -768,7 +773,8 @@ const E = '[data-theme="dark"], .dark, .editora-theme-dark', w = () => {
|
|
|
768
773
|
r.classList.toggle("active", r.getAttribute("data-category") === e);
|
|
769
774
|
});
|
|
770
775
|
}, b = () => {
|
|
771
|
-
if (!n)
|
|
776
|
+
if (!n)
|
|
777
|
+
return;
|
|
772
778
|
const r = y();
|
|
773
779
|
if (r.length === 0) {
|
|
774
780
|
n.innerHTML = `<div class="special-characters-no-results">No characters found for "${t}"</div>`;
|
|
@@ -786,7 +792,8 @@ const E = '[data-theme="dark"], .dark, .editora-theme-dark', w = () => {
|
|
|
786
792
|
};
|
|
787
793
|
u == null || u.addEventListener("click", g), l == null || l.addEventListener("click", (r) => {
|
|
788
794
|
const h = r.target.closest(".special-characters-tab");
|
|
789
|
-
if (!h)
|
|
795
|
+
if (!h)
|
|
796
|
+
return;
|
|
790
797
|
const p = h.getAttribute("data-category");
|
|
791
798
|
!p || e === p || (e = p, f(), b());
|
|
792
799
|
}), d == null || d.addEventListener("input", (r) => {
|
|
@@ -795,7 +802,8 @@ const E = '[data-theme="dark"], .dark, .editora-theme-dark', w = () => {
|
|
|
795
802
|
}, 90);
|
|
796
803
|
}), n == null || n.addEventListener("click", (r) => {
|
|
797
804
|
const h = r.target.closest(".special-characters-item");
|
|
798
|
-
if (!h)
|
|
805
|
+
if (!h)
|
|
806
|
+
return;
|
|
799
807
|
const p = h.getAttribute("data-char");
|
|
800
808
|
p && (L(p), g());
|
|
801
809
|
}), i.addEventListener("click", (r) => {
|
|
@@ -819,4 +827,4 @@ const E = '[data-theme="dark"], .dark, .editora-theme-dark', w = () => {
|
|
|
819
827
|
export {
|
|
820
828
|
q as SpecialCharactersPlugin
|
|
821
829
|
};
|
|
822
|
-
//# sourceMappingURL=SpecialCharactersPlugin.native-
|
|
830
|
+
//# sourceMappingURL=SpecialCharactersPlugin.native-7f06d4ba.mjs.map
|
|
@@ -119,7 +119,8 @@ const B = {
|
|
|
119
119
|
function K(e) {
|
|
120
120
|
var l;
|
|
121
121
|
const t = (e == null ? void 0 : e.contentElement) || (e == null ? void 0 : e.editorElement) || null;
|
|
122
|
-
if (!(t instanceof HTMLElement))
|
|
122
|
+
if (!(t instanceof HTMLElement))
|
|
123
|
+
return;
|
|
123
124
|
const r = t.getAttribute("contenteditable") === "true" ? t : (l = t.querySelector) == null ? void 0 : l.call(t, '[contenteditable="true"]');
|
|
124
125
|
if (r instanceof HTMLElement) {
|
|
125
126
|
s = r, h = r;
|
|
@@ -129,15 +130,19 @@ function K(e) {
|
|
|
129
130
|
o && (s = o, h = o);
|
|
130
131
|
}
|
|
131
132
|
function P() {
|
|
132
|
-
if (typeof window == "undefined")
|
|
133
|
+
if (typeof window == "undefined")
|
|
134
|
+
return null;
|
|
133
135
|
const e = window[R];
|
|
134
|
-
if (!(e instanceof HTMLElement))
|
|
136
|
+
if (!(e instanceof HTMLElement))
|
|
137
|
+
return null;
|
|
135
138
|
window[R] = null;
|
|
136
139
|
const t = e.closest("[data-editora-editor], .rte-editor, .editora-editor, editora-editor") || (e.matches("[data-editora-editor], .rte-editor, .editora-editor, editora-editor") ? e : null);
|
|
137
140
|
if (t) {
|
|
138
141
|
const n = A(t);
|
|
139
|
-
if (n)
|
|
140
|
-
|
|
142
|
+
if (n)
|
|
143
|
+
return n;
|
|
144
|
+
if (t.getAttribute("contenteditable") === "true")
|
|
145
|
+
return t;
|
|
141
146
|
}
|
|
142
147
|
if (e.getAttribute("contenteditable") === "true")
|
|
143
148
|
return e;
|
|
@@ -623,24 +628,29 @@ function k() {
|
|
|
623
628
|
return e && (s = e), e;
|
|
624
629
|
}
|
|
625
630
|
function W(e) {
|
|
626
|
-
if (!e)
|
|
631
|
+
if (!e)
|
|
632
|
+
return;
|
|
627
633
|
const t = e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement, r = t == null ? void 0 : t.closest('[contenteditable="true"]');
|
|
628
634
|
r && (s = r);
|
|
629
635
|
}
|
|
630
636
|
function A(e) {
|
|
631
|
-
if (!e)
|
|
637
|
+
if (!e)
|
|
638
|
+
return null;
|
|
632
639
|
const t = e.querySelector('[contenteditable="true"]');
|
|
633
640
|
return t instanceof HTMLElement ? t : null;
|
|
634
641
|
}
|
|
635
642
|
function Q() {
|
|
636
|
-
if (_)
|
|
643
|
+
if (_)
|
|
644
|
+
return;
|
|
637
645
|
const e = (t) => {
|
|
638
646
|
const r = t.target;
|
|
639
|
-
if (!r)
|
|
647
|
+
if (!r)
|
|
648
|
+
return;
|
|
640
649
|
const n = r.closest(
|
|
641
650
|
'.editora-toolbar-button[data-command="toggleSpellCheck"], .rte-toolbar-button[data-command="toggleSpellCheck"]'
|
|
642
651
|
);
|
|
643
|
-
if (!n)
|
|
652
|
+
if (!n)
|
|
653
|
+
return;
|
|
644
654
|
const o = n.closest("[data-editora-editor]"), l = A(o);
|
|
645
655
|
l && (h = l, s = l);
|
|
646
656
|
};
|
|
@@ -660,7 +670,8 @@ function te() {
|
|
|
660
670
|
b += 1, b === 1 && d && d.disconnect();
|
|
661
671
|
}
|
|
662
672
|
function re() {
|
|
663
|
-
if (b === 0 || (b -= 1, b > 0) || !d)
|
|
673
|
+
if (b === 0 || (b -= 1, b > 0) || !d)
|
|
674
|
+
return;
|
|
664
675
|
const e = k();
|
|
665
676
|
e && d.observe(e, B);
|
|
666
677
|
}
|
|
@@ -689,8 +700,10 @@ const oe = () => {
|
|
|
689
700
|
};
|
|
690
701
|
function ne(e, t) {
|
|
691
702
|
const r = [];
|
|
692
|
-
for (let n = 0; n <= t.length; n++)
|
|
693
|
-
|
|
703
|
+
for (let n = 0; n <= t.length; n++)
|
|
704
|
+
r[n] = [n];
|
|
705
|
+
for (let n = 0; n <= e.length; n++)
|
|
706
|
+
r[0][n] = n;
|
|
694
707
|
for (let n = 1; n <= t.length; n++)
|
|
695
708
|
for (let o = 1; o <= e.length; o++)
|
|
696
709
|
t.charAt(n - 1) === e.charAt(o - 1) ? r[n][o] = r[n - 1][o - 1] : r[n][o] = Math.min(
|
|
@@ -712,7 +725,8 @@ function ae(e, t = 5) {
|
|
|
712
725
|
return o.sort((l, c) => l.distance - c.distance), o.filter((l) => l.distance <= 3).slice(0, t).map((l) => l.word);
|
|
713
726
|
}
|
|
714
727
|
function se(e) {
|
|
715
|
-
if (e.nodeType !== Node.ELEMENT_NODE)
|
|
728
|
+
if (e.nodeType !== Node.ELEMENT_NODE)
|
|
729
|
+
return !1;
|
|
716
730
|
const t = e;
|
|
717
731
|
return !!(t.closest('code, pre, [contenteditable="false"], .rte-widget, .rte-template, .rte-comment, .rte-merge-tag') || t.hasAttribute("data-comment-id") || t.hasAttribute("data-template") || t.hasAttribute("data-merge-tag"));
|
|
718
732
|
}
|
|
@@ -754,18 +768,21 @@ const V = () => {
|
|
|
754
768
|
if (r.getAttribute("contenteditable") === "true")
|
|
755
769
|
return r;
|
|
756
770
|
const n = r.closest('[contenteditable="true"]');
|
|
757
|
-
if (n)
|
|
771
|
+
if (n)
|
|
772
|
+
return n;
|
|
758
773
|
const o = r.closest("[data-editora-editor]");
|
|
759
774
|
if (o) {
|
|
760
775
|
const l = o.querySelector('[contenteditable="true"]');
|
|
761
|
-
if (l)
|
|
776
|
+
if (l)
|
|
777
|
+
return l;
|
|
762
778
|
}
|
|
763
779
|
}
|
|
764
780
|
return document.querySelector('[contenteditable="true"]');
|
|
765
781
|
};
|
|
766
782
|
function M() {
|
|
767
783
|
const e = k();
|
|
768
|
-
if (!e)
|
|
784
|
+
if (!e)
|
|
785
|
+
return [];
|
|
769
786
|
const t = [], r = document.createTreeWalker(
|
|
770
787
|
e,
|
|
771
788
|
NodeFilter.SHOW_TEXT,
|
|
@@ -792,7 +809,8 @@ function m(e) {
|
|
|
792
809
|
n.removeChild(r);
|
|
793
810
|
}
|
|
794
811
|
}), e.forEach((r) => {
|
|
795
|
-
if (S.has(r.word.toLowerCase()))
|
|
812
|
+
if (S.has(r.word.toLowerCase()))
|
|
813
|
+
return;
|
|
796
814
|
const n = r.node.data.length;
|
|
797
815
|
if (!(r.startOffset < 0 || r.endOffset > n || r.startOffset >= r.endOffset))
|
|
798
816
|
try {
|
|
@@ -834,7 +852,8 @@ function J(e) {
|
|
|
834
852
|
}
|
|
835
853
|
function pe(e) {
|
|
836
854
|
const t = k();
|
|
837
|
-
if (!t)
|
|
855
|
+
if (!t)
|
|
856
|
+
return { total: 0, misspelled: 0, accuracy: 100 };
|
|
838
857
|
e || (e = M());
|
|
839
858
|
const r = e.filter((c) => !S.has(c.word.toLowerCase())).length, l = ((t.textContent || "").match(/[\p{L}\p{M}\p{N}]+/gu) || []).length;
|
|
840
859
|
return {
|
|
@@ -909,7 +928,8 @@ function q() {
|
|
|
909
928
|
return r.className = "rte-spell-check-panel", window.getComputedStyle(t).position === "static" && (t.style.position = "relative"), t.appendChild(r), r;
|
|
910
929
|
}
|
|
911
930
|
function E(e) {
|
|
912
|
-
if (!a)
|
|
931
|
+
if (!a)
|
|
932
|
+
return;
|
|
913
933
|
const t = e || M(), r = pe(t);
|
|
914
934
|
a.innerHTML = `
|
|
915
935
|
<div class="rte-spellcheck-header">
|
|
@@ -1036,4 +1056,4 @@ const xe = () => ({
|
|
|
1036
1056
|
export {
|
|
1037
1057
|
xe as SpellCheckPlugin
|
|
1038
1058
|
};
|
|
1039
|
-
//# sourceMappingURL=SpellCheckPlugin.native-
|
|
1059
|
+
//# sourceMappingURL=SpellCheckPlugin.native-04e20834.mjs.map
|
package/dist/{StrikethroughPlugin.native-0Be7j49s.mjs → StrikethroughPlugin.native-905e9501.mjs}
RENAMED
|
@@ -31,11 +31,14 @@ const a = () => ({
|
|
|
31
31
|
*/
|
|
32
32
|
toggleStrikethrough: () => {
|
|
33
33
|
const t = c();
|
|
34
|
-
if (!t)
|
|
34
|
+
if (!t)
|
|
35
|
+
return !1;
|
|
35
36
|
const n = window.getSelection();
|
|
36
|
-
if (!n || n.rangeCount === 0)
|
|
37
|
+
if (!n || n.rangeCount === 0)
|
|
38
|
+
return !1;
|
|
37
39
|
const e = n.getRangeAt(0);
|
|
38
|
-
if (!t.contains(e.commonAncestorContainer))
|
|
40
|
+
if (!t.contains(e.commonAncestorContainer))
|
|
41
|
+
return !1;
|
|
39
42
|
t.focus({ preventScroll: !0 });
|
|
40
43
|
const o = document.execCommand("strikeThrough", !1);
|
|
41
44
|
return s(t), t.dispatchEvent(new Event("input", { bubbles: !0 })), o !== !1;
|
|
@@ -51,7 +54,8 @@ function c() {
|
|
|
51
54
|
const t = window.getSelection();
|
|
52
55
|
if (t && t.rangeCount > 0) {
|
|
53
56
|
const e = t.getRangeAt(0).startContainer, o = e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement, r = o == null ? void 0 : o.closest('[contenteditable="true"], .rte-content, .editora-content');
|
|
54
|
-
if (r)
|
|
57
|
+
if (r)
|
|
58
|
+
return r;
|
|
55
59
|
}
|
|
56
60
|
const n = document.activeElement;
|
|
57
61
|
return n ? n.getAttribute("contenteditable") === "true" ? n : n.closest('[contenteditable="true"], .rte-content, .editora-content') : null;
|
|
@@ -70,4 +74,4 @@ function s(t) {
|
|
|
70
74
|
export {
|
|
71
75
|
a as StrikethroughPlugin
|
|
72
76
|
};
|
|
73
|
-
//# sourceMappingURL=StrikethroughPlugin.native-
|
|
77
|
+
//# sourceMappingURL=StrikethroughPlugin.native-905e9501.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as q, g as X } from "./editorContainerHelpers-
|
|
1
|
+
import { f as q, g as X } from "./editorContainerHelpers-69585c07.mjs";
|
|
2
2
|
let h = null, m = null, R = null, x = null, I = null, M = null, S = null;
|
|
3
3
|
const C = '[data-theme="dark"], .dark, .editora-theme-dark';
|
|
4
4
|
let w = !1, v = null, V = 0, L = 0, E = !1, k = 0, A = 0, B = 0, D = 0;
|
|
@@ -7,7 +7,8 @@ const _ = () => {
|
|
|
7
7
|
if (!t)
|
|
8
8
|
return alert("Please place your cursor in the editor before inserting a table"), !1;
|
|
9
9
|
const n = window.getSelection();
|
|
10
|
-
if (!n || n.rangeCount === 0)
|
|
10
|
+
if (!n || n.rangeCount === 0)
|
|
11
|
+
return;
|
|
11
12
|
const l = n.getRangeAt(0), r = document.createElement("table");
|
|
12
13
|
r.className = "rte-table";
|
|
13
14
|
const o = document.createElement("thead"), a = document.createElement("tr");
|
|
@@ -35,7 +36,8 @@ const _ = () => {
|
|
|
35
36
|
}, P = () => {
|
|
36
37
|
var a;
|
|
37
38
|
const e = p();
|
|
38
|
-
if (!e)
|
|
39
|
+
if (!e)
|
|
40
|
+
return;
|
|
39
41
|
const { table: t, rowIndex: n } = e, l = document.createElement("tr"), r = ((a = t.rows[0]) == null ? void 0 : a.cells.length) || 0;
|
|
40
42
|
for (let s = 0; s < r; s++) {
|
|
41
43
|
const i = document.createElement("td"), d = document.createElement("p");
|
|
@@ -46,7 +48,8 @@ const _ = () => {
|
|
|
46
48
|
}, z = () => {
|
|
47
49
|
var o;
|
|
48
50
|
const e = p();
|
|
49
|
-
if (!e)
|
|
51
|
+
if (!e)
|
|
52
|
+
return;
|
|
50
53
|
const { table: t, rowIndex: n } = e, l = document.createElement("tr"), r = ((o = t.rows[0]) == null ? void 0 : o.cells.length) || 0;
|
|
51
54
|
for (let a = 0; a < r; a++) {
|
|
52
55
|
const s = document.createElement("td"), i = document.createElement("p");
|
|
@@ -55,7 +58,8 @@ const _ = () => {
|
|
|
55
58
|
n >= t.rows.length - 1 ? t.appendChild(l) : t.insertBefore(l, t.rows[n + 1]), g();
|
|
56
59
|
}, W = () => {
|
|
57
60
|
const e = p();
|
|
58
|
-
if (!e)
|
|
61
|
+
if (!e)
|
|
62
|
+
return;
|
|
59
63
|
const { table: t, colIndex: n } = e;
|
|
60
64
|
for (let l = 0; l < t.rows.length; l++) {
|
|
61
65
|
const r = t.rows[l], o = document.createElement("td"), a = document.createElement("p");
|
|
@@ -64,7 +68,8 @@ const _ = () => {
|
|
|
64
68
|
g();
|
|
65
69
|
}, T = () => {
|
|
66
70
|
const e = p();
|
|
67
|
-
if (!e)
|
|
71
|
+
if (!e)
|
|
72
|
+
return;
|
|
68
73
|
const { table: t, colIndex: n } = e;
|
|
69
74
|
for (let l = 0; l < t.rows.length; l++) {
|
|
70
75
|
const r = t.rows[l], o = document.createElement("td"), a = document.createElement("p");
|
|
@@ -73,12 +78,14 @@ const _ = () => {
|
|
|
73
78
|
g();
|
|
74
79
|
}, O = () => {
|
|
75
80
|
const e = p();
|
|
76
|
-
if (!e || e.rowCount <= 1)
|
|
81
|
+
if (!e || e.rowCount <= 1)
|
|
82
|
+
return;
|
|
77
83
|
const { table: t, rowIndex: n } = e;
|
|
78
84
|
t.deleteRow(n), g();
|
|
79
85
|
}, K = () => {
|
|
80
86
|
const e = p();
|
|
81
|
-
if (!e || e.cellCount <= 1)
|
|
87
|
+
if (!e || e.cellCount <= 1)
|
|
88
|
+
return;
|
|
82
89
|
const { table: t, colIndex: n } = e;
|
|
83
90
|
for (let l = 0; l < t.rows.length; l++) {
|
|
84
91
|
const r = t.rows[l];
|
|
@@ -88,7 +95,8 @@ const _ = () => {
|
|
|
88
95
|
}, Y = () => {
|
|
89
96
|
var o;
|
|
90
97
|
const e = p();
|
|
91
|
-
if (!e)
|
|
98
|
+
if (!e)
|
|
99
|
+
return;
|
|
92
100
|
const { table: t, rowIndex: n } = e, l = t.rows[n];
|
|
93
101
|
if (((o = l.parentElement) == null ? void 0 : o.tagName.toLowerCase()) === "thead") {
|
|
94
102
|
const a = t.querySelector("tbody") || t.appendChild(document.createElement("tbody")), s = t.querySelector("thead");
|
|
@@ -101,7 +109,8 @@ const _ = () => {
|
|
|
101
109
|
}, F = () => {
|
|
102
110
|
var l;
|
|
103
111
|
const e = p();
|
|
104
|
-
if (!e)
|
|
112
|
+
if (!e)
|
|
113
|
+
return;
|
|
105
114
|
const { table: t, colIndex: n } = e;
|
|
106
115
|
for (let r = 0; r < t.rows.length; r++) {
|
|
107
116
|
const o = t.rows[r].cells[n];
|
|
@@ -118,27 +127,34 @@ const _ = () => {
|
|
|
118
127
|
g();
|
|
119
128
|
}, U = () => {
|
|
120
129
|
const e = p();
|
|
121
|
-
if (!e)
|
|
130
|
+
if (!e)
|
|
131
|
+
return;
|
|
122
132
|
e.table.remove(), document.dispatchEvent(new CustomEvent("tableDeleted"));
|
|
123
133
|
}, j = () => {
|
|
124
134
|
var u, b;
|
|
125
135
|
const e = window.getSelection();
|
|
126
|
-
if (!e || e.rangeCount === 0)
|
|
136
|
+
if (!e || e.rangeCount === 0)
|
|
137
|
+
return;
|
|
127
138
|
const n = e.getRangeAt(0).startContainer;
|
|
128
|
-
if (!(n.nodeType === Node.TEXT_NODE ? (u = n.parentElement) == null ? void 0 : u.closest("table") : n.closest("table")))
|
|
139
|
+
if (!(n.nodeType === Node.TEXT_NODE ? (u = n.parentElement) == null ? void 0 : u.closest("table") : n.closest("table")))
|
|
140
|
+
return;
|
|
129
141
|
let r = null;
|
|
130
|
-
if (n.nodeType === Node.TEXT_NODE ? r = (b = n.parentElement) == null ? void 0 : b.closest("td, th") : n.nodeType === Node.ELEMENT_NODE && (r = n.closest("td, th")), !r)
|
|
142
|
+
if (n.nodeType === Node.TEXT_NODE ? r = (b = n.parentElement) == null ? void 0 : b.closest("td, th") : n.nodeType === Node.ELEMENT_NODE && (r = n.closest("td, th")), !r)
|
|
143
|
+
return;
|
|
131
144
|
const o = r.parentElement;
|
|
132
|
-
if (!o)
|
|
145
|
+
if (!o)
|
|
146
|
+
return;
|
|
133
147
|
let a = -1;
|
|
134
148
|
for (let f = 0; f < o.cells.length; f++)
|
|
135
149
|
if (o.cells[f] === r) {
|
|
136
150
|
a = f;
|
|
137
151
|
break;
|
|
138
152
|
}
|
|
139
|
-
if (a === -1 || a === o.cells.length - 1)
|
|
153
|
+
if (a === -1 || a === o.cells.length - 1)
|
|
154
|
+
return;
|
|
140
155
|
const s = o.cells[a + 1];
|
|
141
|
-
if (!s)
|
|
156
|
+
if (!s)
|
|
157
|
+
return;
|
|
142
158
|
const i = parseInt(r.getAttribute("colspan") || "1"), d = parseInt(s.getAttribute("colspan") || "1");
|
|
143
159
|
r.setAttribute("colspan", String(i + d)), Array.from(s.childNodes).forEach((f) => {
|
|
144
160
|
r.appendChild(f);
|
|
@@ -147,10 +163,12 @@ const _ = () => {
|
|
|
147
163
|
function p() {
|
|
148
164
|
var i, d, c;
|
|
149
165
|
const e = window.getSelection();
|
|
150
|
-
if (!e || e.rangeCount === 0)
|
|
166
|
+
if (!e || e.rangeCount === 0)
|
|
167
|
+
return null;
|
|
151
168
|
const n = e.getRangeAt(0).startContainer;
|
|
152
169
|
let l = n.nodeType === Node.TEXT_NODE ? (i = n.parentElement) == null ? void 0 : i.closest("table") : n.closest("table");
|
|
153
|
-
if (!l)
|
|
170
|
+
if (!l)
|
|
171
|
+
return null;
|
|
154
172
|
const r = l;
|
|
155
173
|
let o = 0, a = 0;
|
|
156
174
|
const s = n.nodeType === Node.TEXT_NODE ? (d = n.parentElement) == null ? void 0 : d.closest("td, th") : n.closest("td, th");
|
|
@@ -176,9 +194,11 @@ function p() {
|
|
|
176
194
|
};
|
|
177
195
|
}
|
|
178
196
|
function g() {
|
|
179
|
-
if (!h || !m)
|
|
197
|
+
if (!h || !m)
|
|
198
|
+
return;
|
|
180
199
|
const e = p();
|
|
181
|
-
if (!e)
|
|
200
|
+
if (!e)
|
|
201
|
+
return;
|
|
182
202
|
const t = e.rowCount > 1, n = e.cellCount > 1;
|
|
183
203
|
N(t, n);
|
|
184
204
|
}
|
|
@@ -198,7 +218,8 @@ function G() {
|
|
|
198
218
|
}, document.addEventListener("selectionchange", R), document.addEventListener("mousedown", x), document.addEventListener("tableDeleted", I), window.addEventListener("scroll", M, !0), window.addEventListener("resize", S);
|
|
199
219
|
}
|
|
200
220
|
function H(e) {
|
|
201
|
-
if (!h)
|
|
221
|
+
if (!h)
|
|
222
|
+
return;
|
|
202
223
|
const t = e.getBoundingClientRect(), n = h.getBoundingClientRect(), l = n.height || 40, r = n.width || 280, o = 10;
|
|
203
224
|
let a = t.top - l - o, s = t.left + t.width / 2 - r / 2;
|
|
204
225
|
a < o && (a = t.bottom + o), s < o && (s = o);
|
|
@@ -225,7 +246,8 @@ function y() {
|
|
|
225
246
|
m = null;
|
|
226
247
|
}
|
|
227
248
|
function N(e, t) {
|
|
228
|
-
if (!h)
|
|
249
|
+
if (!h)
|
|
250
|
+
return;
|
|
229
251
|
const n = h.querySelector('[data-action="deleteRow"]'), l = h.querySelector('[data-action="deleteColumn"]');
|
|
230
252
|
n && (n.disabled = !e), l && (l.disabled = !t);
|
|
231
253
|
}
|
|
@@ -349,10 +371,12 @@ function $(e) {
|
|
|
349
371
|
const n = e.querySelector(".table-resize-handle");
|
|
350
372
|
n && n.remove();
|
|
351
373
|
const l = e.querySelector("thead tr, tbody tr:first-child");
|
|
352
|
-
if (!l)
|
|
374
|
+
if (!l)
|
|
375
|
+
return;
|
|
353
376
|
const r = l.querySelectorAll("td, th");
|
|
354
377
|
r.forEach((a, s) => {
|
|
355
|
-
if (s === r.length - 1)
|
|
378
|
+
if (s === r.length - 1)
|
|
379
|
+
return;
|
|
356
380
|
const i = document.createElement("div");
|
|
357
381
|
i.className = "resize-handle", i.style.cssText = `
|
|
358
382
|
position: absolute;
|
|
@@ -378,11 +402,13 @@ function $(e) {
|
|
|
378
402
|
}), e.appendChild(o);
|
|
379
403
|
}
|
|
380
404
|
function ee(e, t) {
|
|
381
|
-
if (w = !0, v = t, V = e.clientX, !m)
|
|
405
|
+
if (w = !0, v = t, V = e.clientX, !m)
|
|
406
|
+
return;
|
|
382
407
|
const n = m.querySelector("thead tr, tbody tr:first-child");
|
|
383
408
|
n && n.cells[t] && (L = n.cells[t].offsetWidth), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
384
409
|
const l = (o) => {
|
|
385
|
-
if (!w || v === null || !m)
|
|
410
|
+
if (!w || v === null || !m)
|
|
411
|
+
return;
|
|
386
412
|
const a = o.clientX - V, s = Math.max(50, L + a);
|
|
387
413
|
m.querySelectorAll("tr").forEach((d) => {
|
|
388
414
|
d.cells[v] && (d.cells[v].style.width = s + "px");
|
|
@@ -393,10 +419,12 @@ function ee(e, t) {
|
|
|
393
419
|
document.addEventListener("mousemove", l), document.addEventListener("mouseup", r);
|
|
394
420
|
}
|
|
395
421
|
function te(e) {
|
|
396
|
-
if (!m)
|
|
422
|
+
if (!m)
|
|
423
|
+
return;
|
|
397
424
|
E = !0, k = e.clientX, A = e.clientY, B = m.offsetWidth, D = m.offsetHeight, document.body.style.cursor = "nwse-resize", document.body.style.userSelect = "none";
|
|
398
425
|
const t = (l) => {
|
|
399
|
-
if (!E || !m)
|
|
426
|
+
if (!E || !m)
|
|
427
|
+
return;
|
|
400
428
|
const r = l.clientX - k, o = l.clientY - A, a = Math.max(200, B + r), s = Math.max(100, D + o);
|
|
401
429
|
m.style.width = a + "px", m.style.height = s + "px";
|
|
402
430
|
}, n = () => {
|
|
@@ -492,4 +520,4 @@ export {
|
|
|
492
520
|
F as toggleHeaderColumnCommand,
|
|
493
521
|
Y as toggleHeaderRowCommand
|
|
494
522
|
};
|
|
495
|
-
//# sourceMappingURL=TablePlugin.native-
|
|
523
|
+
//# sourceMappingURL=TablePlugin.native-7d5458c1.mjs.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import N from "./purify.es-
|
|
1
|
+
import N from "./purify.es-3bdbcfc5.mjs";
|
|
2
2
|
let n = null, c = null, f = null, o = null, h = "", v = "", T = "insert", k = null, d = null, b = null;
|
|
3
3
|
function H(t, e) {
|
|
4
|
-
if (e === t.innerHTML)
|
|
4
|
+
if (e === t.innerHTML)
|
|
5
|
+
return;
|
|
5
6
|
const r = window.execEditorCommand || window.executeEditorCommand;
|
|
6
7
|
if (typeof r == "function")
|
|
7
8
|
try {
|
|
@@ -10,7 +11,8 @@ function H(t, e) {
|
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
function z(t) {
|
|
13
|
-
if (!t)
|
|
14
|
+
if (!t)
|
|
15
|
+
return null;
|
|
14
16
|
let e = t.startContainer;
|
|
15
17
|
for (; e && e !== document.body; ) {
|
|
16
18
|
if (e.nodeType === Node.ELEMENT_NODE) {
|
|
@@ -125,7 +127,8 @@ function V() {
|
|
|
125
127
|
}
|
|
126
128
|
const Q = '[data-theme="dark"], .dark, .editora-theme-dark', C = () => {
|
|
127
129
|
const t = window.getSelection();
|
|
128
|
-
if (!t || t.rangeCount === 0)
|
|
130
|
+
if (!t || t.rangeCount === 0)
|
|
131
|
+
return null;
|
|
129
132
|
const e = t.anchorNode, r = e instanceof HTMLElement ? e : e == null ? void 0 : e.parentElement;
|
|
130
133
|
return (r == null ? void 0 : r.closest(
|
|
131
134
|
".rte-content, .editora-content"
|
|
@@ -136,13 +139,16 @@ const Q = '[data-theme="dark"], .dark, .editora-theme-dark', C = () => {
|
|
|
136
139
|
};
|
|
137
140
|
function A() {
|
|
138
141
|
const t = z(f);
|
|
139
|
-
if (t)
|
|
140
|
-
|
|
142
|
+
if (t)
|
|
143
|
+
return t;
|
|
144
|
+
if (b != null && b.isConnected)
|
|
145
|
+
return b;
|
|
141
146
|
const e = C();
|
|
142
147
|
return e || document.querySelector(".rte-content, .editora-content");
|
|
143
148
|
}
|
|
144
149
|
function E() {
|
|
145
|
-
if (!n)
|
|
150
|
+
if (!n)
|
|
151
|
+
return;
|
|
146
152
|
const t = R(), e = S();
|
|
147
153
|
n.innerHTML = `
|
|
148
154
|
<div class="rte-dialog-header">
|
|
@@ -212,7 +218,8 @@ function E() {
|
|
|
212
218
|
`, Z();
|
|
213
219
|
}
|
|
214
220
|
function W() {
|
|
215
|
-
if (!n)
|
|
221
|
+
if (!n)
|
|
222
|
+
return;
|
|
216
223
|
n.innerHTML = `
|
|
217
224
|
<div class="rte-dialog-header">
|
|
218
225
|
<h2>Replace Document?</h2>
|
|
@@ -233,7 +240,8 @@ function S() {
|
|
|
233
240
|
return v.trim() ? P(v) : h ? t.filter((e) => e.category === h) : t;
|
|
234
241
|
}
|
|
235
242
|
function Z() {
|
|
236
|
-
if (!n)
|
|
243
|
+
if (!n)
|
|
244
|
+
return;
|
|
237
245
|
const t = n.querySelector(".rte-dialog-close");
|
|
238
246
|
t == null || t.addEventListener("click", () => u());
|
|
239
247
|
const e = n.querySelector(".rte-cancel-btn");
|
|
@@ -251,13 +259,15 @@ function Z() {
|
|
|
251
259
|
const p = n.querySelector(".rte-tabs");
|
|
252
260
|
p == null || p.addEventListener("click", (a) => {
|
|
253
261
|
const y = a.target.closest(".rte-tab");
|
|
254
|
-
if (!y)
|
|
262
|
+
if (!y)
|
|
263
|
+
return;
|
|
255
264
|
const w = y.getAttribute("data-category");
|
|
256
265
|
w && (h = w, v = "", d !== null && (cancelAnimationFrame(d), d = null), M());
|
|
257
266
|
});
|
|
258
267
|
const s = n.querySelector(".rte-template-list"), m = (a) => {
|
|
259
268
|
const y = a.target.closest(".rte-template-item");
|
|
260
|
-
if (!y)
|
|
269
|
+
if (!y)
|
|
270
|
+
return null;
|
|
261
271
|
const w = y.getAttribute("data-template-id");
|
|
262
272
|
return w && D().find((q) => q.id === w) || null;
|
|
263
273
|
};
|
|
@@ -297,16 +307,19 @@ function G() {
|
|
|
297
307
|
function K(t) {
|
|
298
308
|
var g;
|
|
299
309
|
const e = window.getSelection();
|
|
300
|
-
if (!e)
|
|
310
|
+
if (!e)
|
|
311
|
+
return;
|
|
301
312
|
const r = A();
|
|
302
|
-
if (!r)
|
|
313
|
+
if (!r)
|
|
314
|
+
return;
|
|
303
315
|
if (f)
|
|
304
316
|
e.removeAllRanges(), e.addRange(f);
|
|
305
317
|
else {
|
|
306
318
|
const a = document.createRange();
|
|
307
319
|
a.selectNodeContents(r), a.collapse(!1), e.removeAllRanges(), e.addRange(a);
|
|
308
320
|
}
|
|
309
|
-
if (e.rangeCount === 0)
|
|
321
|
+
if (e.rangeCount === 0)
|
|
322
|
+
return;
|
|
310
323
|
const l = e.getRangeAt(0), p = (g = r == null ? void 0 : r.innerHTML) != null ? g : "", s = document.createRange().createContextualFragment($(t.html));
|
|
311
324
|
l.deleteContents(), l.insertNode(s);
|
|
312
325
|
const m = document.createRange();
|
|
@@ -331,9 +344,11 @@ function B(t) {
|
|
|
331
344
|
b = l || null, _(l);
|
|
332
345
|
}
|
|
333
346
|
function Y() {
|
|
334
|
-
if (typeof document == "undefined")
|
|
347
|
+
if (typeof document == "undefined")
|
|
348
|
+
return;
|
|
335
349
|
const t = "template-plugin-dialog-styles";
|
|
336
|
-
if (document.getElementById(t))
|
|
350
|
+
if (document.getElementById(t))
|
|
351
|
+
return;
|
|
337
352
|
const e = document.createElement("style");
|
|
338
353
|
e.id = t, e.textContent = `
|
|
339
354
|
.rte-dialog-overlay {
|
|
@@ -599,4 +614,4 @@ export {
|
|
|
599
614
|
P as searchTemplates,
|
|
600
615
|
ee as validateTemplate
|
|
601
616
|
};
|
|
602
|
-
//# sourceMappingURL=TemplatePlugin.native-
|
|
617
|
+
//# sourceMappingURL=TemplatePlugin.native-580f0f63.mjs.map
|
package/dist/{TextAlignmentPlugin.native-sM_1s00t.mjs → TextAlignmentPlugin.native-9357b3ed.mjs}
RENAMED
|
@@ -20,7 +20,8 @@ function f(n) {
|
|
|
20
20
|
}
|
|
21
21
|
function h(n) {
|
|
22
22
|
const t = [], e = f(n.startContainer), i = f(n.endContainer);
|
|
23
|
-
if (!e && !i)
|
|
23
|
+
if (!e && !i)
|
|
24
|
+
return t;
|
|
24
25
|
if (n.collapsed)
|
|
25
26
|
return e && t.push(e), t;
|
|
26
27
|
if (e === i)
|
|
@@ -37,7 +38,8 @@ function h(n) {
|
|
|
37
38
|
}
|
|
38
39
|
r = r.nextElementSibling;
|
|
39
40
|
}
|
|
40
|
-
if (!r)
|
|
41
|
+
if (!r)
|
|
42
|
+
break;
|
|
41
43
|
}
|
|
42
44
|
i && !t.includes(i) && t.push(i);
|
|
43
45
|
}
|
|
@@ -48,7 +50,8 @@ function E(n) {
|
|
|
48
50
|
return t ? t.closest(".rte-content, .editora-content") || t.closest('[contenteditable="true"]') : null;
|
|
49
51
|
}
|
|
50
52
|
function m(n, t) {
|
|
51
|
-
if (!n || t === n.innerHTML)
|
|
53
|
+
if (!n || t === n.innerHTML)
|
|
54
|
+
return;
|
|
52
55
|
const e = window.execEditorCommand || window.executeEditorCommand;
|
|
53
56
|
if (typeof e == "function")
|
|
54
57
|
try {
|
|
@@ -58,9 +61,11 @@ function m(n, t) {
|
|
|
58
61
|
}
|
|
59
62
|
const p = (n) => {
|
|
60
63
|
var u;
|
|
61
|
-
if (!n || !["left", "center", "right", "justify"].includes(n))
|
|
64
|
+
if (!n || !["left", "center", "right", "justify"].includes(n))
|
|
65
|
+
return !1;
|
|
62
66
|
const e = window.getSelection();
|
|
63
|
-
if (!e || e.rangeCount === 0)
|
|
67
|
+
if (!e || e.rangeCount === 0)
|
|
68
|
+
return !1;
|
|
64
69
|
const i = e.getRangeAt(0).cloneRange(), o = E(i), s = (o == null ? void 0 : o.innerHTML) || "", r = h(i);
|
|
65
70
|
if (r.length > 0)
|
|
66
71
|
r.forEach((l) => {
|
|
@@ -105,4 +110,4 @@ export {
|
|
|
105
110
|
b as TextAlignmentPlugin,
|
|
106
111
|
p as setTextAlignmentCommand
|
|
107
112
|
};
|
|
108
|
-
//# sourceMappingURL=TextAlignmentPlugin.native-
|
|
113
|
+
//# sourceMappingURL=TextAlignmentPlugin.native-9357b3ed.mjs.map
|