@editora/core 1.0.8 → 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-C3jtAYjG.mjs → ApprovalWorkflowPlugin.native-449ce66c.mjs} +79 -40
- 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-HMWKxWNs.mjs → BlocksLibraryPlugin.native-1cc51e63.mjs} +119 -60
- 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-BnU0qCwR.mjs → CitationsPlugin.native-169fb1e8.mjs} +137 -69
- 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-CfhY46rU.mjs → ConditionalContentPlugin.native-4983143a.mjs} +108 -51
- package/dist/{ContentRulesPlugin.native-nBLQ8QFZ.mjs → ContentRulesPlugin.native-63ed405b.mjs} +100 -50
- package/dist/{DataBindingPlugin.native-jQ1JPRTp.mjs → DataBindingPlugin.native-427e9d75.mjs} +79 -40
- package/dist/{DirectionPlugin.native-CDnbdNyl.mjs → DirectionPlugin.native-4e742f42.mjs} +19 -10
- package/dist/{DocSchemaPlugin.native-CHOge18O.mjs → DocSchemaPlugin.native-8e41eda0.mjs} +115 -58
- 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-BMDlOqur.mjs → MentionPlugin.native-3b1e8c05.mjs} +89 -45
- package/dist/{MergeTagPlugin.native-C3eOfEgw.mjs → MergeTagPlugin.native-31cf7d48.mjs} +51 -26
- package/dist/{PIIRedactionPlugin.native-DcsjmtV1.mjs → PIIRedactionPlugin.native-7ab10b9f.mjs} +107 -54
- package/dist/{PageBreakPlugin.native-DijGuHJZ.mjs → PageBreakPlugin.native-1794c5fb.mjs} +31 -16
- package/dist/{PreviewPlugin.native-WuIwOAOR.mjs → PreviewPlugin.native-f7b67cc0.mjs} +11 -6
- package/dist/{PrintPlugin.native-7qt5v7L5.mjs → PrintPlugin.native-f6a168c2.mjs} +5 -3
- package/dist/{SlashCommandsPlugin.native-CmxvMEaE.mjs → SlashCommandsPlugin.native-8d45e511.mjs} +72 -37
- package/dist/{SmartPastePlugin.native-BOKKtF07.mjs → SmartPastePlugin.native-a6c5efec.mjs} +99 -50
- 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-Bghu2q4a.mjs → TrackChangesPlugin.native-e96da509.mjs} +115 -58
- package/dist/{TranslationWorkflowPlugin.native-Bz6jDGvj.mjs → TranslationWorkflowPlugin.native-4e711b1e.mjs} +160 -91
- package/dist/{UnderlinePlugin.native-QpIcK4L2.mjs → UnderlinePlugin.native-8080c998.mjs} +1 -1
- package/dist/{VersionDiffPlugin.native-Bvxgy--t.mjs → VersionDiffPlugin.native-5bbeff85.mjs} +51 -26
- 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-DqC57IEH.mjs → index-7da30697.mjs} +163 -124
- 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 +67 -67
- package/dist/{purify.es-CKpwg8Tk.mjs → purify.es-3bdbcfc5.mjs} +20 -10
- package/dist/style.css +1 -0
- package/dist/webcomponent-core.js +164 -125
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +18 -17
- package/dist/webcomponent.cjs.js +1 -1
- package/dist/webcomponent.esm.js +1 -1
- package/dist/webcomponent.js +226 -187
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +1324 -1117
- package/package.json +11 -5
- package/LICENSE +0 -21
- package/dist/_commonjsHelpers-DOllISpa.mjs +0 -32
- package/dist/core.css +0 -1
- package/dist/documentManager-vQ1VkbUY.mjs +0 -8418
- package/dist/index-BslAFzmv.mjs +0 -16544
- package/dist/index-D1LOqg5C.js +0 -10
- package/dist/index.es-BYD2KEo6.mjs +0 -6666
package/dist/{EmbedIframePlugin.native-DKJx2OS7.mjs → EmbedIframePlugin.native-55209c87.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const q = [
|
|
2
2
|
{ label: "Inline Value", value: "inline" },
|
|
3
3
|
{ label: "Responsive - 21x9", value: "21x9" },
|
|
4
4
|
{ label: "Responsive - 16x9", value: "16x9" },
|
|
@@ -22,13 +22,13 @@ const D = [
|
|
|
22
22
|
enableScrollbar: !0
|
|
23
23
|
}
|
|
24
24
|
}), h.get(e));
|
|
25
|
-
function
|
|
25
|
+
function L(e) {
|
|
26
26
|
if (e != null && e.matches(u) || e != null && e.closest(u))
|
|
27
27
|
return !0;
|
|
28
28
|
const t = document.activeElement;
|
|
29
29
|
return t != null && t.closest(u) ? !0 : document.body.matches(u) || document.documentElement.matches(u);
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const N = () => ({
|
|
32
32
|
name: "embedIframe",
|
|
33
33
|
toolbar: [
|
|
34
34
|
{
|
|
@@ -40,16 +40,16 @@ const A = () => ({
|
|
|
40
40
|
}
|
|
41
41
|
],
|
|
42
42
|
commands: {
|
|
43
|
-
openEmbedIframeDialog: (e) => (
|
|
43
|
+
openEmbedIframeDialog: (e) => ($(e), !0)
|
|
44
44
|
},
|
|
45
45
|
keymap: {
|
|
46
46
|
"Mod-Shift-e": "openEmbedIframeDialog"
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
-
function
|
|
49
|
+
function $(e) {
|
|
50
50
|
if (!e) {
|
|
51
|
-
const
|
|
52
|
-
|
|
51
|
+
const o = document.activeElement;
|
|
52
|
+
o && o.closest("[data-editora-editor]") && (e = o.closest("[data-editora-editor]"));
|
|
53
53
|
}
|
|
54
54
|
if (e || (e = document.querySelector("[data-editora-editor]")), !e) {
|
|
55
55
|
console.warn("Editor element not found");
|
|
@@ -69,10 +69,10 @@ function L(e) {
|
|
|
69
69
|
showBorder: !0,
|
|
70
70
|
enableScrollbar: !0
|
|
71
71
|
}, t.activeTab = "general";
|
|
72
|
-
const
|
|
73
|
-
|
|
72
|
+
const a = document.createElement("div");
|
|
73
|
+
a.className = "rte-dialog-overlay rte-embed-iframe-overlay", L(e) && a.classList.add("rte-theme-dark"), a.onclick = () => p(e);
|
|
74
74
|
const r = document.createElement("div");
|
|
75
|
-
r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (
|
|
75
|
+
r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (o) => o.stopPropagation(), r.innerHTML = `
|
|
76
76
|
<div class="rte-dialog-header">
|
|
77
77
|
<h3>Embed Iframe</h3>
|
|
78
78
|
<button class="rte-dialog-close">×</button>
|
|
@@ -92,7 +92,7 @@ function L(e) {
|
|
|
92
92
|
<div class="rte-form-group">
|
|
93
93
|
<label class="rte-form-label">Size</label>
|
|
94
94
|
<select class="rte-form-select" id="iframe-size">
|
|
95
|
-
${
|
|
95
|
+
${q.map((o) => `<option value="${o.value}">${o.label}</option>`).join("")}
|
|
96
96
|
</select>
|
|
97
97
|
</div>
|
|
98
98
|
<div class="rte-form-row" id="dimensions-row">
|
|
@@ -146,73 +146,73 @@ function L(e) {
|
|
|
146
146
|
<button type="button" class="rte-btn rte-btn-secondary" id="cancel-btn">Cancel</button>
|
|
147
147
|
<button type="submit" class="rte-btn rte-btn-primary" id="save-btn">Save</button>
|
|
148
148
|
</div>
|
|
149
|
-
`,
|
|
150
|
-
|
|
151
|
-
}, document.addEventListener("keydown", t.escapeHandler, !0),
|
|
152
|
-
var
|
|
153
|
-
(
|
|
149
|
+
`, a.appendChild(r), document.body.appendChild(a), t.dialogElement = a, t.escapeHandler = (o) => {
|
|
150
|
+
o.key === "Escape" && (o.preventDefault(), o.stopPropagation(), p(e));
|
|
151
|
+
}, document.addEventListener("keydown", t.escapeHandler, !0), C(r, e), A(), setTimeout(() => {
|
|
152
|
+
var o;
|
|
153
|
+
(o = r.querySelector("#iframe-src")) == null || o.focus();
|
|
154
154
|
}, 100);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function C(e, t) {
|
|
157
157
|
var l, i, d, f;
|
|
158
158
|
s(t), (l = e.querySelector(".rte-dialog-close")) == null || l.addEventListener("click", () => p(t)), e.querySelectorAll(".rte-tab-button").forEach((n) => {
|
|
159
159
|
n.addEventListener("click", (m) => {
|
|
160
160
|
const c = m.target.getAttribute("data-tab");
|
|
161
|
-
c &&
|
|
161
|
+
c && H(e, c, t);
|
|
162
162
|
});
|
|
163
163
|
});
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
const r = e.querySelector("#iframe-width"),
|
|
167
|
-
r == null || r.addEventListener("input", (n) =>
|
|
164
|
+
const a = e.querySelector("#iframe-size");
|
|
165
|
+
a == null || a.addEventListener("change", (n) => z(e, n.target.value, t));
|
|
166
|
+
const r = e.querySelector("#iframe-width"), o = e.querySelector("#iframe-height");
|
|
167
|
+
r == null || r.addEventListener("input", (n) => E(e, n.target.value, t)), o == null || o.addEventListener("input", (n) => I(e, n.target.value, t)), (i = e.querySelector("#constrain-btn")) == null || i.addEventListener("click", () => P(e, t)), (d = e.querySelector("#cancel-btn")) == null || d.addEventListener("click", () => p(t)), (f = e.querySelector("#save-btn")) == null || f.addEventListener("click", () => R(e, t));
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
const r = s(
|
|
171
|
-
r.activeTab = t, e.querySelectorAll(".rte-tab-button").forEach((
|
|
172
|
-
|
|
173
|
-
}), e.querySelectorAll(".rte-tab-panel").forEach((
|
|
174
|
-
|
|
169
|
+
function H(e, t, a) {
|
|
170
|
+
const r = s(a);
|
|
171
|
+
r.activeTab = t, e.querySelectorAll(".rte-tab-button").forEach((o) => {
|
|
172
|
+
o.classList.toggle("active", o.getAttribute("data-tab") === t);
|
|
173
|
+
}), e.querySelectorAll(".rte-tab-panel").forEach((o) => {
|
|
174
|
+
o.style.display = o.getAttribute("data-panel") === t ? "block" : "none";
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
const r = s(
|
|
177
|
+
function z(e, t, a) {
|
|
178
|
+
const r = s(a);
|
|
179
179
|
r.formData.selectedSize = t;
|
|
180
|
-
const
|
|
181
|
-
t === "inline" ? (
|
|
180
|
+
const o = e.querySelector("#dimensions-row"), l = e.querySelector("#iframe-width"), i = e.querySelector("#iframe-height");
|
|
181
|
+
t === "inline" ? (o.style.display = "flex", l.value = "100%", i.value = "400px", r.formData.width = "100%", r.formData.height = "400px") : (o.style.display = "none", r.formData.width = "100%", r.formData.height = "auto");
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
const r = s(
|
|
183
|
+
function E(e, t, a) {
|
|
184
|
+
const r = s(a);
|
|
185
185
|
if (r.formData.width = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
|
|
186
|
-
const
|
|
187
|
-
if (!isNaN(
|
|
188
|
-
const l =
|
|
186
|
+
const o = parseFloat(t);
|
|
187
|
+
if (!isNaN(o)) {
|
|
188
|
+
const l = o * 9 / 16;
|
|
189
189
|
r.formData.height = `${l}px`;
|
|
190
190
|
const i = e.querySelector("#iframe-height");
|
|
191
191
|
i && (i.value = r.formData.height);
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
const r = s(
|
|
195
|
+
function I(e, t, a) {
|
|
196
|
+
const r = s(a);
|
|
197
197
|
if (r.formData.height = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
|
|
198
|
-
const
|
|
199
|
-
if (!isNaN(
|
|
200
|
-
const l =
|
|
198
|
+
const o = parseFloat(t);
|
|
199
|
+
if (!isNaN(o)) {
|
|
200
|
+
const l = o * 16 / 9;
|
|
201
201
|
r.formData.width = `${l}px`;
|
|
202
202
|
const i = e.querySelector("#iframe-width");
|
|
203
203
|
i && (i.value = r.formData.width);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
const
|
|
209
|
-
|
|
207
|
+
function P(e, t) {
|
|
208
|
+
const a = s(t);
|
|
209
|
+
a.formData.constrainProportions = !a.formData.constrainProportions;
|
|
210
210
|
const r = e.querySelector("#constrain-btn");
|
|
211
|
-
r && (r.textContent =
|
|
211
|
+
r && (r.textContent = a.formData.constrainProportions ? "🔒" : "🔓", r.className = `rte-constrain-btn ${a.formData.constrainProportions ? "locked" : "unlocked"}`, r.title = a.formData.constrainProportions ? "Unlock proportions" : "Lock proportions");
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
var
|
|
215
|
-
const
|
|
213
|
+
function R(e, t) {
|
|
214
|
+
var b, g, v, x, y, k, w, S, D;
|
|
215
|
+
const a = s(t), r = (b = e.querySelector("#iframe-src")) == null ? void 0 : b.value.trim();
|
|
216
216
|
if (!r) {
|
|
217
217
|
alert("Please enter a source URL");
|
|
218
218
|
return;
|
|
@@ -221,25 +221,24 @@ function P(e, t) {
|
|
|
221
221
|
alert("Please enter a valid URL starting with https:// or http://");
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
let n = o.formData.width, m = o.formData.height;
|
|
228
|
-
o.formData.selectedSize !== "inline" && (n = "100%", m = "auto"), R(t, {
|
|
224
|
+
const o = (g = e.querySelector("#iframe-name")) == null ? void 0 : g.value.trim(), l = (v = e.querySelector("#iframe-title")) == null ? void 0 : v.value.trim(), i = (x = e.querySelector("#iframe-longdesc")) == null ? void 0 : x.value.trim(), d = (y = e.querySelector("#iframe-desc-url")) == null ? void 0 : y.value.trim(), f = (w = (k = e.querySelector("#iframe-border")) == null ? void 0 : k.checked) != null ? w : !0, n = (D = (S = e.querySelector("#iframe-scrollbar")) == null ? void 0 : S.checked) != null ? D : !0;
|
|
225
|
+
let m = a.formData.width, c = a.formData.height;
|
|
226
|
+
a.formData.selectedSize !== "inline" && (m = "100%", c = "auto"), T(t, {
|
|
229
227
|
src: r,
|
|
230
|
-
width:
|
|
231
|
-
height:
|
|
232
|
-
aspectRatio:
|
|
233
|
-
name:
|
|
228
|
+
width: m,
|
|
229
|
+
height: c,
|
|
230
|
+
aspectRatio: a.formData.selectedSize,
|
|
231
|
+
name: o || void 0,
|
|
234
232
|
title: l || void 0,
|
|
235
233
|
longDescription: i || void 0,
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
descriptionUrl: d || void 0,
|
|
235
|
+
showBorder: f,
|
|
236
|
+
enableScrollbar: n
|
|
238
237
|
}), p(t);
|
|
239
238
|
}
|
|
240
|
-
function
|
|
241
|
-
const
|
|
242
|
-
|
|
239
|
+
function T(e, t) {
|
|
240
|
+
const a = e.querySelector('[contenteditable="true"]');
|
|
241
|
+
a && (a.focus(), setTimeout(() => {
|
|
243
242
|
const r = [
|
|
244
243
|
`src="${t.src}"`,
|
|
245
244
|
`width="${t.width}"`,
|
|
@@ -249,9 +248,9 @@ function R(e, t) {
|
|
|
249
248
|
`scrolling="${t.enableScrollbar ? "auto" : "no"}"`
|
|
250
249
|
];
|
|
251
250
|
t.name && r.push(`name="${t.name}"`), t.title && r.push(`title="${t.title}"`), t.longDescription && r.push(`longdesc="${t.longDescription}"`);
|
|
252
|
-
const
|
|
253
|
-
t.aspectRatio !== "inline" &&
|
|
254
|
-
const l =
|
|
251
|
+
const o = [];
|
|
252
|
+
t.aspectRatio !== "inline" && o.push(`rte-iframe-${t.aspectRatio}`);
|
|
253
|
+
const l = o.length > 0 ? `class="${o.join(" ")}"` : "", i = `data-aspect-ratio="${t.aspectRatio}"`, d = `<iframe ${r.join(" ")} ${l} ${i}></iframe>`;
|
|
255
254
|
if (!document.execCommand("insertHTML", !1, d)) {
|
|
256
255
|
const n = window.getSelection();
|
|
257
256
|
if (n && n.rangeCount > 0) {
|
|
@@ -271,8 +270,9 @@ function p(e) {
|
|
|
271
270
|
const t = s(e);
|
|
272
271
|
t.escapeHandler && (document.removeEventListener("keydown", t.escapeHandler, !0), t.escapeHandler = null), t.dialogElement && (t.dialogElement.remove(), t.dialogElement = null);
|
|
273
272
|
}
|
|
274
|
-
function
|
|
275
|
-
if (document.getElementById("embed-iframe-dialog-styles"))
|
|
273
|
+
function A() {
|
|
274
|
+
if (document.getElementById("embed-iframe-dialog-styles"))
|
|
275
|
+
return;
|
|
276
276
|
const e = document.createElement("style");
|
|
277
277
|
e.id = "embed-iframe-dialog-styles", e.textContent = `
|
|
278
278
|
/* Embed Iframe Dialog Styles */
|
|
@@ -563,6 +563,6 @@ function T() {
|
|
|
563
563
|
`, document.head.appendChild(e);
|
|
564
564
|
}
|
|
565
565
|
export {
|
|
566
|
-
|
|
566
|
+
N as EmbedIframePlugin
|
|
567
567
|
};
|
|
568
|
-
//# sourceMappingURL=EmbedIframePlugin.native-
|
|
568
|
+
//# sourceMappingURL=EmbedIframePlugin.native-55209c87.mjs.map
|
|
@@ -706,9 +706,11 @@ const y = '[data-theme="dark"], .dark, .editora-theme-dark', C = () => ({
|
|
|
706
706
|
return e ? (E(e), !0) : !1;
|
|
707
707
|
},
|
|
708
708
|
insertEmoji: (r, t) => {
|
|
709
|
-
if (!r)
|
|
709
|
+
if (!r)
|
|
710
|
+
return !1;
|
|
710
711
|
const e = (t == null ? void 0 : t.contentElement) || b();
|
|
711
|
-
if (!e)
|
|
712
|
+
if (!e)
|
|
713
|
+
return !1;
|
|
712
714
|
try {
|
|
713
715
|
return k(r, e), !0;
|
|
714
716
|
} catch (o) {
|
|
@@ -785,7 +787,8 @@ function z(r, t) {
|
|
|
785
787
|
o == null || o.addEventListener("click", (i) => {
|
|
786
788
|
var j;
|
|
787
789
|
const c = i.target.closest(".emojis-item");
|
|
788
|
-
if (!c)
|
|
790
|
+
if (!c)
|
|
791
|
+
return;
|
|
789
792
|
const h = c.getAttribute("data-emoji") || ((j = c.textContent) == null ? void 0 : j.trim()) || "";
|
|
790
793
|
h && (k(h, t), m());
|
|
791
794
|
});
|
|
@@ -828,7 +831,8 @@ function b() {
|
|
|
828
831
|
const r = window.getSelection();
|
|
829
832
|
if (r && r.rangeCount > 0) {
|
|
830
833
|
const e = r.anchorNode, o = e instanceof HTMLElement ? e : e == null ? void 0 : e.parentElement, a = o == null ? void 0 : o.closest(".editora-content, .rte-content");
|
|
831
|
-
if (a)
|
|
834
|
+
if (a)
|
|
835
|
+
return a;
|
|
832
836
|
}
|
|
833
837
|
const t = document.activeElement;
|
|
834
838
|
return t && (t.classList.contains("editora-content") || t.classList.contains("rte-content")) ? t : document.querySelector(".editora-content, .rte-content");
|
|
@@ -838,7 +842,8 @@ function A(r) {
|
|
|
838
842
|
return t ? !!t.closest(y) : !1;
|
|
839
843
|
}
|
|
840
844
|
function L() {
|
|
841
|
-
if (document.getElementById("emojis-dialog-styles"))
|
|
845
|
+
if (document.getElementById("emojis-dialog-styles"))
|
|
846
|
+
return;
|
|
842
847
|
const r = document.createElement("style");
|
|
843
848
|
r.id = "emojis-dialog-styles", r.textContent = `
|
|
844
849
|
.emojis-overlay {
|
|
@@ -1114,4 +1119,4 @@ function L() {
|
|
|
1114
1119
|
export {
|
|
1115
1120
|
C as EmojisPlugin
|
|
1116
1121
|
};
|
|
1117
|
-
//# sourceMappingURL=EmojisPlugin.native-
|
|
1122
|
+
//# sourceMappingURL=EmojisPlugin.native-65c5ac47.mjs.map
|
|
@@ -47,7 +47,8 @@ const E = () => ({
|
|
|
47
47
|
],
|
|
48
48
|
commands: {
|
|
49
49
|
setFontFamily: (e) => {
|
|
50
|
-
if (!e)
|
|
50
|
+
if (!e)
|
|
51
|
+
return !1;
|
|
51
52
|
try {
|
|
52
53
|
return C(e), !0;
|
|
53
54
|
} catch (t) {
|
|
@@ -100,7 +101,8 @@ function A(e, t, n) {
|
|
|
100
101
|
}
|
|
101
102
|
function C(e) {
|
|
102
103
|
const t = window.getSelection();
|
|
103
|
-
if (!t || t.rangeCount === 0)
|
|
104
|
+
if (!t || t.rangeCount === 0)
|
|
105
|
+
return;
|
|
104
106
|
const n = t.getRangeAt(0), r = n.cloneRange(), a = h(n.commonAncestorContainer);
|
|
105
107
|
if (n.collapsed)
|
|
106
108
|
return;
|
|
@@ -111,7 +113,8 @@ function C(e) {
|
|
|
111
113
|
o.selectNodeContents(s), t.removeAllRanges(), t.addRange(o), f(a);
|
|
112
114
|
return;
|
|
113
115
|
}
|
|
114
|
-
if (!a)
|
|
116
|
+
if (!a)
|
|
117
|
+
return;
|
|
115
118
|
const m = new Set(
|
|
116
119
|
Array.from(a.querySelectorAll("font[face]"))
|
|
117
120
|
), u = new Set(
|
|
@@ -155,4 +158,4 @@ function F(e, t) {
|
|
|
155
158
|
export {
|
|
156
159
|
E as FontFamilyPlugin
|
|
157
160
|
};
|
|
158
|
-
//# sourceMappingURL=FontFamilyPlugin.native-
|
|
161
|
+
//# sourceMappingURL=FontFamilyPlugin.native-f9bc255a.mjs.map
|
|
@@ -71,10 +71,12 @@ const O = () => ({
|
|
|
71
71
|
},
|
|
72
72
|
setFontSize: (e) => {
|
|
73
73
|
var o;
|
|
74
|
-
if (!e)
|
|
74
|
+
if (!e)
|
|
75
|
+
return !1;
|
|
75
76
|
try {
|
|
76
77
|
const n = e.trim().match(/^(\d+(?:\.\d+)?)(px|em|rem)?$/i);
|
|
77
|
-
if (!n)
|
|
78
|
+
if (!n)
|
|
79
|
+
return !1;
|
|
78
80
|
const i = parseFloat(n[1]), r = ((o = n[2]) == null ? void 0 : o.toLowerCase()) || "px";
|
|
79
81
|
return r === "px" && (i < 8 || i > 72) || (r === "em" || r === "rem") && (i < 0.5 || i > 5) ? !1 : (C(i, r), !0);
|
|
80
82
|
} catch (t) {
|
|
@@ -132,7 +134,8 @@ function E(e, o, t, n) {
|
|
|
132
134
|
const i = Array.from(
|
|
133
135
|
e.querySelectorAll("font[size], [style*='font-size']")
|
|
134
136
|
), r = (s) => {
|
|
135
|
-
if (!n || !s.isConnected)
|
|
137
|
+
if (!n || !s.isConnected)
|
|
138
|
+
return !1;
|
|
136
139
|
try {
|
|
137
140
|
if (typeof n.intersectsNode == "function")
|
|
138
141
|
return n.intersectsNode(s);
|
|
@@ -174,7 +177,8 @@ function T(e, o, t) {
|
|
|
174
177
|
}
|
|
175
178
|
function y(e) {
|
|
176
179
|
const o = window.getSelection();
|
|
177
|
-
if (!o || o.rangeCount === 0)
|
|
180
|
+
if (!o || o.rangeCount === 0)
|
|
181
|
+
return;
|
|
178
182
|
const { value: t, unit: n } = h();
|
|
179
183
|
let i = e;
|
|
180
184
|
(n === "em" || n === "rem") && (i = e * 0.125);
|
|
@@ -202,7 +206,8 @@ function h() {
|
|
|
202
206
|
}
|
|
203
207
|
function C(e, o = "px") {
|
|
204
208
|
const t = window.getSelection();
|
|
205
|
-
if (!t || t.rangeCount === 0)
|
|
209
|
+
if (!t || t.rangeCount === 0)
|
|
210
|
+
return;
|
|
206
211
|
const n = t.getRangeAt(0), i = n.cloneRange(), r = x(n.commonAncestorContainer);
|
|
207
212
|
if (n.collapsed)
|
|
208
213
|
return;
|
|
@@ -213,7 +218,8 @@ function C(e, o = "px") {
|
|
|
213
218
|
m.selectNodeContents(a), t.removeAllRanges(), t.addRange(m);
|
|
214
219
|
return;
|
|
215
220
|
}
|
|
216
|
-
if (!r)
|
|
221
|
+
if (!r)
|
|
222
|
+
return;
|
|
217
223
|
const l = new Set(
|
|
218
224
|
Array.from(
|
|
219
225
|
r.querySelectorAll("font[size], [style*='font-size']")
|
|
@@ -256,7 +262,8 @@ function v(e, o) {
|
|
|
256
262
|
function z() {
|
|
257
263
|
setTimeout(() => {
|
|
258
264
|
const { value: e, unit: o } = h(), t = window.getSelection();
|
|
259
|
-
if (!t || t.rangeCount === 0)
|
|
265
|
+
if (!t || t.rangeCount === 0)
|
|
266
|
+
return;
|
|
260
267
|
let n = null, r = t.getRangeAt(0).startContainer;
|
|
261
268
|
for (; r; ) {
|
|
262
269
|
if (r instanceof HTMLElement && (r.classList.contains("rte-editor") || r.classList.contains("editora-editor") || r.hasAttribute("data-editora-editor"))) {
|
|
@@ -265,7 +272,8 @@ function z() {
|
|
|
265
272
|
}
|
|
266
273
|
r = r.parentNode;
|
|
267
274
|
}
|
|
268
|
-
if (!n)
|
|
275
|
+
if (!n)
|
|
276
|
+
return;
|
|
269
277
|
const c = n.querySelector(
|
|
270
278
|
".rte-toolbar-wrapper, .editora-toolbar-container"
|
|
271
279
|
) || n, s = Array.from(
|
|
@@ -273,7 +281,8 @@ function z() {
|
|
|
273
281
|
'input[data-command="setFontSize"], input.editora-toolbar-input.font-size, input.rte-toolbar-input.font-size, input[title="Font Size"]'
|
|
274
282
|
)
|
|
275
283
|
);
|
|
276
|
-
if (s.length === 0)
|
|
284
|
+
if (s.length === 0)
|
|
285
|
+
return;
|
|
277
286
|
const l = `${e % 1 === 0 ? e.toString() : e.toFixed(2).replace(/\.?0+$/, "")}${o}`;
|
|
278
287
|
s.forEach((u) => {
|
|
279
288
|
u.value = l;
|
|
@@ -283,4 +292,4 @@ function z() {
|
|
|
283
292
|
export {
|
|
284
293
|
O as FontSizePlugin
|
|
285
294
|
};
|
|
286
|
-
//# sourceMappingURL=FontSizePlugin.native-
|
|
295
|
+
//# sourceMappingURL=FontSizePlugin.native-f5647872.mjs.map
|