@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
package/dist/{CapitalizationPlugin.native-DOMsh5R7.mjs → CapitalizationPlugin.native-42c135dc.mjs}
RENAMED
|
@@ -50,7 +50,8 @@ const i = () => {
|
|
|
50
50
|
],
|
|
51
51
|
commands: {
|
|
52
52
|
setCapitalization: (e) => {
|
|
53
|
-
if (!e)
|
|
53
|
+
if (!e)
|
|
54
|
+
return !1;
|
|
54
55
|
switch (e) {
|
|
55
56
|
case "uppercase":
|
|
56
57
|
return o();
|
|
@@ -76,4 +77,4 @@ const i = () => {
|
|
|
76
77
|
export {
|
|
77
78
|
i as CapitalizationPlugin
|
|
78
79
|
};
|
|
79
|
-
//# sourceMappingURL=CapitalizationPlugin.native-
|
|
80
|
+
//# sourceMappingURL=CapitalizationPlugin.native-42c135dc.mjs.map
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
const N = "__editoraCommandEditorRoot", w = (t) => {
|
|
2
|
-
if (!t)
|
|
2
|
+
if (!t)
|
|
3
|
+
return null;
|
|
3
4
|
const e = t.querySelector('[contenteditable="true"]');
|
|
4
5
|
return e instanceof HTMLElement ? e : null;
|
|
5
6
|
}, A = () => {
|
|
6
|
-
if (typeof window == "undefined")
|
|
7
|
+
if (typeof window == "undefined")
|
|
8
|
+
return null;
|
|
7
9
|
const t = window[N];
|
|
8
|
-
if (!(t instanceof HTMLElement))
|
|
10
|
+
if (!(t instanceof HTMLElement))
|
|
11
|
+
return null;
|
|
9
12
|
window[N] = null;
|
|
10
13
|
const e = t.closest("[data-editora-editor], .rte-editor, .editora-editor, editora-editor") || (t.matches("[data-editora-editor], .rte-editor, .editora-editor, editora-editor") ? t : null);
|
|
11
14
|
if (e) {
|
|
12
15
|
const n = w(e);
|
|
13
|
-
if (n)
|
|
14
|
-
|
|
16
|
+
if (n)
|
|
17
|
+
return n;
|
|
18
|
+
if (e.getAttribute("contenteditable") === "true")
|
|
19
|
+
return e;
|
|
15
20
|
}
|
|
16
21
|
if (t.getAttribute("contenteditable") === "true")
|
|
17
22
|
return t;
|
|
@@ -38,18 +43,21 @@ const N = "__editoraCommandEditorRoot", w = (t) => {
|
|
|
38
43
|
if (r.getAttribute("contenteditable") === "true")
|
|
39
44
|
return r;
|
|
40
45
|
const n = r.closest('[contenteditable="true"]');
|
|
41
|
-
if (n)
|
|
46
|
+
if (n)
|
|
47
|
+
return n;
|
|
42
48
|
}
|
|
43
49
|
return document.querySelector('[contenteditable="true"]');
|
|
44
50
|
}, H = (t) => t ? t.nodeType === Node.ELEMENT_NODE ? t : t.parentElement : null, S = (t) => {
|
|
45
51
|
const e = window.getSelection();
|
|
46
|
-
if (!e || e.rangeCount === 0)
|
|
52
|
+
if (!e || e.rangeCount === 0)
|
|
53
|
+
return null;
|
|
47
54
|
const r = e.getRangeAt(0);
|
|
48
55
|
return t.contains(r.commonAncestorContainer) ? r : null;
|
|
49
56
|
}, y = (t) => {
|
|
50
57
|
t.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
51
58
|
}, M = (t, e) => {
|
|
52
|
-
if (e === t.innerHTML)
|
|
59
|
+
if (e === t.innerHTML)
|
|
60
|
+
return;
|
|
53
61
|
const r = window.execEditorCommand || window.executeEditorCommand;
|
|
54
62
|
if (typeof r == "function")
|
|
55
63
|
try {
|
|
@@ -62,7 +70,8 @@ const N = "__editoraCommandEditorRoot", w = (t) => {
|
|
|
62
70
|
return;
|
|
63
71
|
}
|
|
64
72
|
const r = window.getSelection();
|
|
65
|
-
if (!r)
|
|
73
|
+
if (!r)
|
|
74
|
+
return;
|
|
66
75
|
const n = document.createRange();
|
|
67
76
|
n.selectNodeContents(t), n.collapse(!1), r.removeAllRanges();
|
|
68
77
|
try {
|
|
@@ -109,8 +118,10 @@ const N = "__editoraCommandEditorRoot", w = (t) => {
|
|
|
109
118
|
for (; l && l !== document.body; ) {
|
|
110
119
|
if (l.nodeType === Node.ELEMENT_NODE) {
|
|
111
120
|
const h = l;
|
|
112
|
-
if (b(h))
|
|
113
|
-
|
|
121
|
+
if (b(h))
|
|
122
|
+
return h;
|
|
123
|
+
if (h.getAttribute("contenteditable") === "true")
|
|
124
|
+
break;
|
|
114
125
|
}
|
|
115
126
|
l = l.parentNode;
|
|
116
127
|
}
|
|
@@ -124,7 +135,8 @@ const N = "__editoraCommandEditorRoot", w = (t) => {
|
|
|
124
135
|
{
|
|
125
136
|
acceptNode: (a) => {
|
|
126
137
|
const l = a;
|
|
127
|
-
if (!b(l) || l.closest("ul, ol"))
|
|
138
|
+
if (!b(l) || l.closest("ul, ol"))
|
|
139
|
+
return NodeFilter.FILTER_SKIP;
|
|
128
140
|
if (typeof t.intersectsNode == "function")
|
|
129
141
|
return t.intersectsNode(l) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
130
142
|
const h = document.createRange();
|
|
@@ -142,7 +154,8 @@ const N = "__editoraCommandEditorRoot", w = (t) => {
|
|
|
142
154
|
}, O = (t) => {
|
|
143
155
|
const e = [], r = document.createElement("div"), n = () => {
|
|
144
156
|
const o = r.innerHTML.trim();
|
|
145
|
-
if (!o)
|
|
157
|
+
if (!o)
|
|
158
|
+
return;
|
|
146
159
|
const u = document.createElement("p");
|
|
147
160
|
u.innerHTML = o, e.push(u), r.innerHTML = "";
|
|
148
161
|
};
|
|
@@ -167,16 +180,20 @@ const N = "__editoraCommandEditorRoot", w = (t) => {
|
|
|
167
180
|
name: "checklist",
|
|
168
181
|
// Initialize click handler when plugin is loaded
|
|
169
182
|
init: () => {
|
|
170
|
-
if (typeof document == "undefined" || typeof window == "undefined" || window.__checklistPluginClickInitialized)
|
|
183
|
+
if (typeof document == "undefined" || typeof window == "undefined" || window.__checklistPluginClickInitialized)
|
|
184
|
+
return;
|
|
171
185
|
window.__checklistPluginClickInitialized = !0;
|
|
172
186
|
const t = (e) => {
|
|
173
187
|
const n = e.target.closest('li[data-type="checklist-item"]');
|
|
174
|
-
if (!n)
|
|
188
|
+
if (!n)
|
|
189
|
+
return;
|
|
175
190
|
const o = n.getBoundingClientRect();
|
|
176
|
-
if (!(e.clientX - o.left < 32))
|
|
191
|
+
if (!(e.clientX - o.left < 32))
|
|
192
|
+
return;
|
|
177
193
|
e.preventDefault(), e.stopPropagation();
|
|
178
194
|
const i = n.closest("[contenteditable], .rte-content, .editora-content");
|
|
179
|
-
if ((i == null ? void 0 : i.getAttribute("contenteditable")) === "false" || !!(i != null && i.closest('[data-readonly="true"], .editora-editor[readonly], editora-editor[readonly]')))
|
|
195
|
+
if ((i == null ? void 0 : i.getAttribute("contenteditable")) === "false" || !!(i != null && i.closest('[data-readonly="true"], .editora-editor[readonly], editora-editor[readonly]')))
|
|
196
|
+
return;
|
|
180
197
|
const a = (i == null ? void 0 : i.innerHTML) || "", l = n.getAttribute("data-checked") === "true";
|
|
181
198
|
n.setAttribute("data-checked", (!l).toString()), i && (M(i, a), y(i));
|
|
182
199
|
};
|
|
@@ -228,15 +245,19 @@ const N = "__editoraCommandEditorRoot", w = (t) => {
|
|
|
228
245
|
toggleChecklist: () => {
|
|
229
246
|
try {
|
|
230
247
|
const t = _();
|
|
231
|
-
if (!t)
|
|
248
|
+
if (!t)
|
|
249
|
+
return !1;
|
|
232
250
|
const e = t.innerHTML, r = () => (M(t, e), y(t), !0), n = S(t);
|
|
233
|
-
if (!n)
|
|
251
|
+
if (!n)
|
|
252
|
+
return !1;
|
|
234
253
|
const o = H(n.startContainer);
|
|
235
|
-
if (!o)
|
|
254
|
+
if (!o)
|
|
255
|
+
return !1;
|
|
236
256
|
const u = o.closest('ul[data-type="checklist"]');
|
|
237
257
|
if (u && t.contains(u)) {
|
|
238
258
|
const c = T(u);
|
|
239
|
-
if (c.length === 0)
|
|
259
|
+
if (c.length === 0)
|
|
260
|
+
return !1;
|
|
240
261
|
const p = document.createDocumentFragment();
|
|
241
262
|
let s = null;
|
|
242
263
|
return c.forEach((f, g) => {
|
|
@@ -306,4 +327,4 @@ const N = "__editoraCommandEditorRoot", w = (t) => {
|
|
|
306
327
|
export {
|
|
307
328
|
D as ChecklistPlugin
|
|
308
329
|
};
|
|
309
|
-
//# sourceMappingURL=ChecklistPlugin.native-
|
|
330
|
+
//# sourceMappingURL=ChecklistPlugin.native-3b397ee9.mjs.map
|