@editora/core 1.0.9 → 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.
- package/README.md +1 -1
- package/dist/{A11yCheckerPlugin.native-58d12bed.mjs → A11yCheckerPlugin.native-BRdGYMju.mjs} +12 -23
- package/dist/{AnchorPlugin.native-289a112a.mjs → AnchorPlugin.native-BcYGEtd9.mjs} +102 -112
- package/dist/{ApprovalWorkflowPlugin.native-449ce66c.mjs → ApprovalWorkflowPlugin.native-BZ6jO-Wj.mjs} +173 -209
- package/dist/{BackgroundColorPlugin.native-8aceb5cc.mjs → BackgroundColorPlugin.native-50iAT9xU.mjs} +9 -16
- package/dist/BlockquotePlugin.native-57_Xcjl1.mjs +212 -0
- package/dist/{BlocksLibraryPlugin.native-1cc51e63.mjs → BlocksLibraryPlugin.native-5sdsXsiE.mjs} +149 -205
- package/dist/{BoldPlugin.native-f9d7f8e4.mjs → BoldPlugin.native-CSh_LiIJ.mjs} +11 -7
- package/dist/CapitalizationPlugin.native-DLV4oPmB.mjs +159 -0
- package/dist/ChecklistPlugin.native-BS-kMz9O.mjs +371 -0
- package/dist/{CitationsPlugin.native-169fb1e8.mjs → CitationsPlugin.native-DQgoCd1B.mjs} +196 -261
- package/dist/ClearFormattingPlugin.native-DIS6AN2t.mjs +172 -0
- package/dist/CodePlugin.native-C5l1IeSS.mjs +4570 -0
- package/dist/{CodeSamplePlugin.native-6cc0148e.mjs → CodeSamplePlugin.native-CgGoH-X4.mjs} +10 -19
- package/dist/{CommentsPlugin.native-03659874.mjs → CommentsPlugin.native-DPSqTkiv.mjs} +28 -55
- package/dist/{ConditionalContentPlugin.native-4983143a.mjs → ConditionalContentPlugin.native-CfhY46rU.mjs} +51 -108
- package/dist/{ContentRulesPlugin.native-63ed405b.mjs → ContentRulesPlugin.native-vPx5nC73.mjs} +153 -200
- package/dist/{DataBindingPlugin.native-427e9d75.mjs → DataBindingPlugin.native-BoXwghTz.mjs} +88 -124
- package/dist/DirectionPlugin.native-Bl-QLFzO.mjs +153 -0
- package/dist/{DocSchemaPlugin.native-8e41eda0.mjs → DocSchemaPlugin.native-DUSVRHqT.mjs} +112 -166
- package/dist/{DocumentManagerPlugin.native-e69895ad.mjs → DocumentManagerPlugin.native-C2cs_1w4.mjs} +4 -4
- package/dist/EmbedIframePlugin.native-BF_-LjTq.mjs +740 -0
- package/dist/{EmojisPlugin.native-65c5ac47.mjs → EmojisPlugin.native-CitxxlWX.mjs} +6 -11
- package/dist/{FontFamilyPlugin.native-f9bc255a.mjs → FontFamilyPlugin.native-j8hMTbg4.mjs} +4 -7
- package/dist/{FontSizePlugin.native-f5647872.mjs → FontSizePlugin.native-B_jCh7dY.mjs} +10 -19
- package/dist/{FootnotePlugin.native-494657b3.mjs → FootnotePlugin.native-D730OGRm.mjs} +39 -77
- package/dist/{FullscreenPlugin.native-87ce92e9.mjs → FullscreenPlugin.native-ChXyxeNw.mjs} +1 -1
- package/dist/HeadingPlugin.native-DZdvubrQ.mjs +249 -0
- package/dist/{HistoryPlugin.native-92ed4be4.mjs → HistoryPlugin.native-D2wl32jV.mjs} +107 -143
- package/dist/{IndentPlugin.native-e4ee902b.mjs → IndentPlugin.native-BHixp8sP.mjs} +12 -23
- package/dist/{ItalicPlugin.native-7c95cfbc.mjs → ItalicPlugin.native-CmnlwFHB.mjs} +15 -11
- package/dist/{LineHeightPlugin.native-5668f78c.mjs → LineHeightPlugin.native-CM7iXdQj.mjs} +10 -19
- package/dist/{LinkPlugin.native-6df29111.mjs → LinkPlugin.native-DYCIcdTm.mjs} +5 -9
- package/dist/{ListPlugin.native-fe2e115a.mjs → ListPlugin.native-V7EZC1lM.mjs} +5 -9
- package/dist/MathPlugin.native-NwWPHVmj.mjs +369 -0
- package/dist/{MediaManagerPlugin.native-3cf48a00.mjs → MediaManagerPlugin.native-eOsTJFpw.mjs} +11 -21
- package/dist/{MentionPlugin.native-3b1e8c05.mjs → MentionPlugin.native-BMDlOqur.mjs} +45 -89
- package/dist/MergeTagPlugin.native-BzRVoD9-.mjs +580 -0
- package/dist/{PIIRedactionPlugin.native-7ab10b9f.mjs → PIIRedactionPlugin.native-g7j4jOmm.mjs} +210 -260
- package/dist/{PageBreakPlugin.native-1794c5fb.mjs → PageBreakPlugin.native-DijGuHJZ.mjs} +16 -31
- package/dist/{PreviewPlugin.native-f7b67cc0.mjs → PreviewPlugin.native-WuIwOAOR.mjs} +6 -11
- package/dist/{PrintPlugin.native-f6a168c2.mjs → PrintPlugin.native-7qt5v7L5.mjs} +3 -5
- package/dist/{SlashCommandsPlugin.native-8d45e511.mjs → SlashCommandsPlugin.native-BiN6ODw5.mjs} +36 -71
- package/dist/{SmartPastePlugin.native-a6c5efec.mjs → SmartPastePlugin.native-CZAEHkyt.mjs} +173 -219
- package/dist/{SpecialCharactersPlugin.native-7f06d4ba.mjs → SpecialCharactersPlugin.native-DaG4b19I.mjs} +101 -85
- package/dist/{SpellCheckPlugin.native-04e20834.mjs → SpellCheckPlugin.native-BZB9AewP.mjs} +21 -41
- package/dist/{StrikethroughPlugin.native-905e9501.mjs → StrikethroughPlugin.native-V0TL4F48.mjs} +12 -30
- package/dist/{TablePlugin.native-7d5458c1.mjs → TablePlugin.native-DrHX-efe.mjs} +30 -58
- package/dist/TemplatePlugin.native-DLjFUaPW.mjs +1150 -0
- package/dist/{TextAlignmentPlugin.native-9357b3ed.mjs → TextAlignmentPlugin.native-sM_1s00t.mjs} +6 -11
- package/dist/{TextColorPlugin.native-d53ed459.mjs → TextColorPlugin.native-Bwl_bSmc.mjs} +14 -26
- package/dist/{TrackChangesPlugin.native-e96da509.mjs → TrackChangesPlugin.native-Bghu2q4a.mjs} +58 -115
- package/dist/{TranslationWorkflowPlugin.native-4e711b1e.mjs → TranslationWorkflowPlugin.native-DdF16tgT.mjs} +191 -257
- package/dist/{UnderlinePlugin.native-8080c998.mjs → UnderlinePlugin.native-DZzg23rv.mjs} +8 -4
- package/dist/{VersionDiffPlugin.native-5bbeff85.mjs → VersionDiffPlugin.native-Bvxgy--t.mjs} +26 -51
- package/dist/_commonjsHelpers-DOllISpa.mjs +32 -0
- package/dist/{anchoredPopover-5cca53ba.mjs → anchoredPopover-Bxds0VoB.mjs} +1 -1
- package/dist/core.css +1 -0
- package/dist/documentManager-vQ1VkbUY.mjs +8418 -0
- package/dist/{editorContainerHelpers-69585c07.mjs → editorContainerHelpers-C7kdWnS0.mjs} +2 -3
- package/dist/editora.min.js +13 -14
- package/dist/editora.umd.js +13 -14
- package/dist/{html2canvas.esm-c51cb3b9.mjs → html2canvas.esm-AYkPY5LS.mjs} +894 -978
- package/dist/index-BslAFzmv.mjs +16544 -0
- package/dist/index-CPMGUZfB.js +10 -0
- package/dist/{index-7da30697.mjs → index-DBoj6QfW.mjs} +127 -164
- package/dist/index.cjs.js +1 -1
- package/dist/index.es-BYD2KEo6.mjs +6666 -0
- package/dist/index.esm.js +7 -12
- package/dist/inlineFormatting-DJ0-NZtx.mjs +97 -0
- package/dist/{jspdf.es.min-780c82db.mjs → jspdf.es.min-BJGtOnRT.mjs} +3784 -4808
- package/dist/plugin-loader.js +67 -67
- package/dist/{purify.es-3bdbcfc5.mjs → purify.es-CKpwg8Tk.mjs} +10 -20
- package/dist/webcomponent-core.js +131 -168
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +139 -63
- package/dist/webcomponent.cjs.js +1 -1
- package/dist/webcomponent.esm.js +1 -1
- package/dist/webcomponent.js +191 -228
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +1240 -1344
- package/package.json +1 -1
- package/dist/BlockquotePlugin.native-3541c714.mjs +0 -49
- package/dist/CapitalizationPlugin.native-42c135dc.mjs +0 -80
- package/dist/ChecklistPlugin.native-3b397ee9.mjs +0 -330
- package/dist/ClearFormattingPlugin.native-77baa514.mjs +0 -145
- package/dist/CodePlugin.native-989cf0aa.mjs +0 -2740
- package/dist/DirectionPlugin.native-4e742f42.mjs +0 -139
- package/dist/EmbedIframePlugin.native-55209c87.mjs +0 -568
- package/dist/HeadingPlugin.native-e38c4a16.mjs +0 -64
- package/dist/MathPlugin.native-735bbac2.mjs +0 -296
- package/dist/MergeTagPlugin.native-31cf7d48.mjs +0 -584
- package/dist/TemplatePlugin.native-580f0f63.mjs +0 -617
- package/dist/_commonjsHelpers-69d58be2.mjs +0 -31
- package/dist/documentManager-8327fb6e.mjs +0 -9166
- package/dist/index-072ef022.js +0 -11
- package/dist/index-49d31221.mjs +0 -16860
- package/dist/index.es-b47a189f.mjs +0 -5782
- package/dist/style.css +0 -1
package/dist/{BackgroundColorPlugin.native-8aceb5cc.mjs → BackgroundColorPlugin.native-50iAT9xU.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as P, b as R } from "./anchoredPopover-
|
|
1
|
+
import { a as P, b as R } from "./anchoredPopover-Bxds0VoB.mjs";
|
|
2
2
|
let a = null, B = null, g = null, L = null, i = "#ffff00";
|
|
3
3
|
const k = '[data-theme="dark"], .dark, .editora-theme-dark', I = [
|
|
4
4
|
"#000000",
|
|
@@ -22,8 +22,7 @@ function A() {
|
|
|
22
22
|
const o = n.closest(
|
|
23
23
|
'[data-editora-editor="true"], .rte-editor, .editora-editor'
|
|
24
24
|
);
|
|
25
|
-
if (o)
|
|
26
|
-
return o;
|
|
25
|
+
if (o) return o;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
const t = document.activeElement;
|
|
@@ -50,8 +49,7 @@ function M(e) {
|
|
|
50
49
|
const l = Array.from(
|
|
51
50
|
n.querySelectorAll(`[data-command="${e}"]`)
|
|
52
51
|
), s = c(l);
|
|
53
|
-
if (s)
|
|
54
|
-
return s;
|
|
52
|
+
if (s) return s;
|
|
55
53
|
}
|
|
56
54
|
const o = Array.from(
|
|
57
55
|
document.querySelectorAll(`[data-command="${e}"]`)
|
|
@@ -59,13 +57,11 @@ function M(e) {
|
|
|
59
57
|
return c(o);
|
|
60
58
|
}
|
|
61
59
|
function T(e) {
|
|
62
|
-
if (e != null && e.closest(k))
|
|
63
|
-
return !0;
|
|
60
|
+
if (e != null && e.closest(k)) return !0;
|
|
64
61
|
const t = window.getSelection();
|
|
65
62
|
if (t && t.rangeCount > 0) {
|
|
66
63
|
const c = t.getRangeAt(0).startContainer, n = c.nodeType === Node.ELEMENT_NODE ? c : c.parentElement;
|
|
67
|
-
if (n != null && n.closest(k))
|
|
68
|
-
return !0;
|
|
64
|
+
if (n != null && n.closest(k)) return !0;
|
|
69
65
|
}
|
|
70
66
|
const r = document.activeElement;
|
|
71
67
|
return r != null && r.closest(k) ? !0 : document.body.matches(k) || document.documentElement.matches(k);
|
|
@@ -333,8 +329,7 @@ function q() {
|
|
|
333
329
|
return u.type = "text", u.className = "rte-bg-color-text-input", u.id = "rte-bg-color-text-input", u.placeholder = "#FFFF00", u.value = i.toUpperCase(), u.maxLength = 7, w.appendChild(m), w.appendChild(u), C.appendChild(E), C.appendChild(w), n.appendChild(o), n.appendChild(p), n.appendChild(C), e.appendChild(t), e.appendChild(n), e;
|
|
334
330
|
}
|
|
335
331
|
function _() {
|
|
336
|
-
if (!a)
|
|
337
|
-
return;
|
|
332
|
+
if (!a) return;
|
|
338
333
|
const e = a.querySelector("#rte-bg-color-close");
|
|
339
334
|
e == null || e.addEventListener("click", () => f());
|
|
340
335
|
const t = a.querySelector("#rte-bg-color-grid");
|
|
@@ -362,14 +357,12 @@ function _() {
|
|
|
362
357
|
}));
|
|
363
358
|
}
|
|
364
359
|
function S() {
|
|
365
|
-
if (!a)
|
|
366
|
-
return;
|
|
360
|
+
if (!a) return;
|
|
367
361
|
const e = a.querySelector("#rte-bg-color-preview-swatch"), t = a.querySelector("#rte-bg-color-preview-hex"), r = a.querySelector("#rte-bg-color-input"), c = a.querySelector("#rte-bg-color-text-input");
|
|
368
362
|
e && (e.style.backgroundColor = i), t && (t.textContent = i.toUpperCase()), r && (r.value = i), c && (c.value = i.toUpperCase());
|
|
369
363
|
}
|
|
370
364
|
function N() {
|
|
371
|
-
if (!a)
|
|
372
|
-
return;
|
|
365
|
+
if (!a) return;
|
|
373
366
|
a.querySelectorAll(".rte-bg-color-swatch").forEach((t) => {
|
|
374
367
|
const r = t.dataset.color;
|
|
375
368
|
(r == null ? void 0 : r.toUpperCase()) === i.toUpperCase() ? t.classList.add("selected") : t.classList.remove("selected");
|
|
@@ -490,4 +483,4 @@ const O = () => ({
|
|
|
490
483
|
export {
|
|
491
484
|
O as BackgroundColorPlugin
|
|
492
485
|
};
|
|
493
|
-
//# sourceMappingURL=BackgroundColorPlugin.native-
|
|
486
|
+
//# sourceMappingURL=BackgroundColorPlugin.native-50iAT9xU.mjs.map
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
const m = '.rte-content, .editora-content, [contenteditable="true"]', B = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", k = [
|
|
2
|
+
"p",
|
|
3
|
+
"div",
|
|
4
|
+
"h1",
|
|
5
|
+
"h2",
|
|
6
|
+
"h3",
|
|
7
|
+
"h4",
|
|
8
|
+
"h5",
|
|
9
|
+
"h6",
|
|
10
|
+
"ul",
|
|
11
|
+
"ol",
|
|
12
|
+
"blockquote",
|
|
13
|
+
"pre",
|
|
14
|
+
"table"
|
|
15
|
+
].join(",");
|
|
16
|
+
function E(e) {
|
|
17
|
+
return e ? e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement : null;
|
|
18
|
+
}
|
|
19
|
+
function b(e) {
|
|
20
|
+
const t = e == null ? void 0 : e.contentElement;
|
|
21
|
+
if (t instanceof HTMLElement) return t;
|
|
22
|
+
const n = e == null ? void 0 : e.editorElement;
|
|
23
|
+
if (n instanceof HTMLElement) {
|
|
24
|
+
const r = n.querySelector(m);
|
|
25
|
+
if (r instanceof HTMLElement) return r;
|
|
26
|
+
if (n.getAttribute("contenteditable") === "true") return n;
|
|
27
|
+
}
|
|
28
|
+
const o = window.getSelection();
|
|
29
|
+
if (o && o.rangeCount > 0) {
|
|
30
|
+
const r = E(o.getRangeAt(0).startContainer), i = r == null ? void 0 : r.closest(m);
|
|
31
|
+
if (i instanceof HTMLElement) return i;
|
|
32
|
+
const f = r == null ? void 0 : r.closest(B), d = f == null ? void 0 : f.querySelector(m);
|
|
33
|
+
if (d instanceof HTMLElement) return d;
|
|
34
|
+
}
|
|
35
|
+
const c = document.activeElement, l = c == null ? void 0 : c.closest(m);
|
|
36
|
+
return l instanceof HTMLElement ? l : document.querySelector(m);
|
|
37
|
+
}
|
|
38
|
+
function M(e) {
|
|
39
|
+
const t = window.getSelection();
|
|
40
|
+
if (!t || t.rangeCount === 0) return null;
|
|
41
|
+
const n = t.getRangeAt(0);
|
|
42
|
+
return !e.contains(n.startContainer) || !e.contains(n.endContainer) ? null : n;
|
|
43
|
+
}
|
|
44
|
+
function N(e, t) {
|
|
45
|
+
let n = E(t);
|
|
46
|
+
if (!n || n === e || !e.contains(n)) return null;
|
|
47
|
+
for (; n.parentElement && n.parentElement !== e; )
|
|
48
|
+
n = n.parentElement;
|
|
49
|
+
if (n.parentElement !== e) return null;
|
|
50
|
+
if (n.matches(k)) return n;
|
|
51
|
+
const o = n.closest(k);
|
|
52
|
+
return o instanceof HTMLElement && o.parentElement === e ? o : n;
|
|
53
|
+
}
|
|
54
|
+
function w(e, t) {
|
|
55
|
+
if (typeof e.intersectsNode == "function")
|
|
56
|
+
try {
|
|
57
|
+
return e.intersectsNode(t);
|
|
58
|
+
} catch (o) {
|
|
59
|
+
return !1;
|
|
60
|
+
}
|
|
61
|
+
const n = document.createRange();
|
|
62
|
+
return n.selectNode(t), e.compareBoundaryPoints(Range.END_TO_START, n) < 0 && e.compareBoundaryPoints(Range.START_TO_END, n) > 0;
|
|
63
|
+
}
|
|
64
|
+
function q(e, t) {
|
|
65
|
+
const n = N(e, t.startContainer), o = N(e, t.endContainer);
|
|
66
|
+
if (!n) return [];
|
|
67
|
+
if (!o || n === o) return [n];
|
|
68
|
+
const l = Array.from(e.children).filter(
|
|
69
|
+
(r) => r instanceof HTMLElement
|
|
70
|
+
).filter((r) => w(t, r));
|
|
71
|
+
return l.length > 0 ? l : [n];
|
|
72
|
+
}
|
|
73
|
+
function S(e, t) {
|
|
74
|
+
const n = E(t), o = n == null ? void 0 : n.closest("blockquote");
|
|
75
|
+
return o instanceof HTMLQuoteElement && e.contains(o) ? o : null;
|
|
76
|
+
}
|
|
77
|
+
function v(e) {
|
|
78
|
+
return e.tagName !== "P" || e.attributes.length > 0 || (e.textContent || "").trim() !== "" ? !1 : !e.querySelector("img, video, table, iframe, hr, pre, ul, ol");
|
|
79
|
+
}
|
|
80
|
+
function O(e) {
|
|
81
|
+
Array.from(e.children).forEach((t) => {
|
|
82
|
+
v(t) && t.remove();
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function h(e) {
|
|
86
|
+
O(e);
|
|
87
|
+
const t = e.parentNode;
|
|
88
|
+
if (!t) return;
|
|
89
|
+
Array.from(e.childNodes).forEach((o) => {
|
|
90
|
+
t.insertBefore(o, e);
|
|
91
|
+
}), t.removeChild(e);
|
|
92
|
+
}
|
|
93
|
+
function y(e) {
|
|
94
|
+
return e.nodeType === Node.TEXT_NODE && (e.textContent || "").trim() === "";
|
|
95
|
+
}
|
|
96
|
+
function L(e) {
|
|
97
|
+
const t = Array.from(e.childNodes).filter((o) => !y(o));
|
|
98
|
+
if (t.length !== 1) return null;
|
|
99
|
+
const n = t[0];
|
|
100
|
+
return n instanceof HTMLQuoteElement ? n : null;
|
|
101
|
+
}
|
|
102
|
+
function R(e) {
|
|
103
|
+
const t = document.createElement("blockquote");
|
|
104
|
+
return Array.from(e.childNodes).filter((o) => !y(o)).forEach((o) => {
|
|
105
|
+
t.appendChild(o);
|
|
106
|
+
}), t.childNodes.length || (t.innerHTML = "<br>"), e.appendChild(t), t;
|
|
107
|
+
}
|
|
108
|
+
function A(e, t) {
|
|
109
|
+
const n = Array.from(e.querySelectorAll("li")).filter(
|
|
110
|
+
(c) => c instanceof HTMLLIElement && w(t, c)
|
|
111
|
+
), o = new Set(n);
|
|
112
|
+
return n.filter((c) => {
|
|
113
|
+
var r, i;
|
|
114
|
+
let l = (r = c.parentElement) == null ? void 0 : r.closest("li");
|
|
115
|
+
for (; l; ) {
|
|
116
|
+
if (o.has(l)) return !1;
|
|
117
|
+
l = (i = l.parentElement) == null ? void 0 : i.closest("li");
|
|
118
|
+
}
|
|
119
|
+
return !0;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function g(e) {
|
|
123
|
+
const t = window.getSelection();
|
|
124
|
+
if (!t) return;
|
|
125
|
+
const n = document.createRange(), o = e instanceof HTMLElement && e.querySelector("p,li,h1,h2,h3,h4,h5,h6") || e;
|
|
126
|
+
n.selectNodeContents(o), n.collapse(!0), t.removeAllRanges(), t.addRange(n);
|
|
127
|
+
}
|
|
128
|
+
function H(e) {
|
|
129
|
+
e.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
130
|
+
}
|
|
131
|
+
function I(e, t, n) {
|
|
132
|
+
const o = window.execEditorCommand;
|
|
133
|
+
if (typeof o == "function") {
|
|
134
|
+
o("recordDomTransaction", e, t, n);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const c = window.executeEditorCommand;
|
|
138
|
+
typeof c == "function" && c("recordDomTransaction", { editor: e, beforeHTML: t, afterHTML: n });
|
|
139
|
+
}
|
|
140
|
+
function _(e) {
|
|
141
|
+
var T, C;
|
|
142
|
+
const t = b(e);
|
|
143
|
+
if (!t) return !1;
|
|
144
|
+
const n = M(t);
|
|
145
|
+
if (!n) return !1;
|
|
146
|
+
const o = t.innerHTML, c = S(t, n.startContainer), l = S(t, n.endContainer), r = A(t, n), i = q(t, n), f = i.length > 0 && i.every((s) => s.tagName === "BLOCKQUOTE");
|
|
147
|
+
if (c && c === l) {
|
|
148
|
+
const s = c.firstChild || c;
|
|
149
|
+
h(c), g(s);
|
|
150
|
+
} else if (r.length > 0) {
|
|
151
|
+
const s = r.map(L);
|
|
152
|
+
if (s.every(Boolean)) {
|
|
153
|
+
const u = ((T = s[0]) == null ? void 0 : T.firstChild) || r[0];
|
|
154
|
+
s.forEach((a) => {
|
|
155
|
+
a && h(a);
|
|
156
|
+
}), g(u);
|
|
157
|
+
} else {
|
|
158
|
+
const u = r[0];
|
|
159
|
+
r.forEach((a) => {
|
|
160
|
+
L(a) || R(a);
|
|
161
|
+
}), g(u);
|
|
162
|
+
}
|
|
163
|
+
} else if (f) {
|
|
164
|
+
const s = i[0].firstChild || i[0];
|
|
165
|
+
i.forEach(h), g(s);
|
|
166
|
+
} else {
|
|
167
|
+
const s = i.filter((a) => a.tagName !== "BLOCKQUOTE");
|
|
168
|
+
if (s.length === 0) return !1;
|
|
169
|
+
const p = document.createElement("blockquote"), u = s[0];
|
|
170
|
+
(C = u.parentNode) == null || C.insertBefore(p, u), s.forEach((a) => {
|
|
171
|
+
p.appendChild(a);
|
|
172
|
+
}), g(p);
|
|
173
|
+
}
|
|
174
|
+
const d = t.innerHTML;
|
|
175
|
+
return o === d ? !1 : (I(t, o, d), H(t), !0);
|
|
176
|
+
}
|
|
177
|
+
const x = () => ({
|
|
178
|
+
name: "blockquote",
|
|
179
|
+
// Schema definition for blockquote node
|
|
180
|
+
nodes: {
|
|
181
|
+
blockquote: {
|
|
182
|
+
content: "block+",
|
|
183
|
+
group: "block",
|
|
184
|
+
parseDOM: [{ tag: "blockquote" }],
|
|
185
|
+
toDOM: () => ["blockquote", 0]
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
// Toolbar button configuration
|
|
189
|
+
toolbar: [
|
|
190
|
+
{
|
|
191
|
+
label: "Quote",
|
|
192
|
+
command: "toggleBlockquote",
|
|
193
|
+
icon: '<svg fill="#000000" height="24px" width="24px" version="1.1" id="Icons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" xml:space="preserve"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <g> <path d="M13,11c0.6,0,1-0.4,1-1s-0.4-1-1-1c-5,0-9,4-9,9c0,2.8,2.2,5,5,5s5-2.2,5-5s-2.2-5-5-5c-0.3,0-0.7,0-1,0.1 C9.3,11.8,11,11,13,11z"></path> <path d="M23,13c-0.3,0-0.7,0-1,0.1c1.3-1.3,3-2.1,5-2.1c0.6,0,1-0.4,1-1s-0.4-1-1-1c-5,0-9,4-9,9c0,2.8,2.2,5,5,5s5-2.2,5-5 S25.8,13,23,13z"></path> </g> </g></svg>',
|
|
194
|
+
shortcut: "Mod-Shift-9"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
// Native command implementations
|
|
198
|
+
commands: {
|
|
199
|
+
/**
|
|
200
|
+
* Toggle blockquote formatting on current selection
|
|
201
|
+
*/
|
|
202
|
+
toggleBlockquote: (e, t) => _(t)
|
|
203
|
+
},
|
|
204
|
+
// Keyboard shortcuts
|
|
205
|
+
keymap: {
|
|
206
|
+
"Mod-Shift-9": "toggleBlockquote"
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
export {
|
|
210
|
+
x as BlockquotePlugin
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=BlockquotePlugin.native-57_Xcjl1.mjs.map
|