@editora/core 1.0.6 → 1.0.8
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/LICENSE +21 -0
- package/dist/{AnchorPlugin.native-C1Rw5m04.mjs → AnchorPlugin.native-BcYGEtd9.mjs} +129 -105
- package/dist/ApprovalWorkflowPlugin.native-C3jtAYjG.mjs +1076 -0
- package/dist/{BackgroundColorPlugin.native-BE-p9DRd.mjs → BackgroundColorPlugin.native-50iAT9xU.mjs} +119 -122
- package/dist/BlocksLibraryPlugin.native-HMWKxWNs.mjs +1327 -0
- package/dist/CitationsPlugin.native-BnU0qCwR.mjs +1464 -0
- package/dist/CodePlugin.native-DlpTPdkd.mjs +2691 -0
- package/dist/{CommentsPlugin.native-tMnWn8a2.mjs → CommentsPlugin.native-DPSqTkiv.mjs} +153 -135
- package/dist/ConditionalContentPlugin.native-CfhY46rU.mjs +1367 -0
- package/dist/ContentRulesPlugin.native-nBLQ8QFZ.mjs +1099 -0
- package/dist/DataBindingPlugin.native-jQ1JPRTp.mjs +917 -0
- package/dist/DocSchemaPlugin.native-CHOge18O.mjs +1325 -0
- package/dist/{DocumentManagerPlugin.native-BvZL5CSG.mjs → DocumentManagerPlugin.native-C2cs_1w4.mjs} +43 -43
- package/dist/{EmbedIframePlugin.native-CSWIB1jm.mjs → EmbedIframePlugin.native-DKJx2OS7.mjs} +61 -58
- package/dist/{EmojisPlugin.native-DxTm_DL-.mjs → EmojisPlugin.native-CitxxlWX.mjs} +135 -104
- package/dist/{LinkPlugin.native-CS2g-G18.mjs → LinkPlugin.native-DYCIcdTm.mjs} +47 -45
- package/dist/{MathPlugin.native-KUxz0o8C.mjs → MathPlugin.native-f_mDp8VL.mjs} +149 -108
- package/dist/{MediaManagerPlugin.native-CgP5iInD.mjs → MediaManagerPlugin.native-BiXiK8FC.mjs} +238 -217
- package/dist/MentionPlugin.native-BMDlOqur.mjs +734 -0
- package/dist/MergeTagPlugin.native-C3eOfEgw.mjs +559 -0
- package/dist/PIIRedactionPlugin.native-DcsjmtV1.mjs +1396 -0
- package/dist/{PageBreakPlugin.native-CGiQxXqR.mjs → PageBreakPlugin.native-DijGuHJZ.mjs} +86 -77
- package/dist/{PreviewPlugin.native-DBvfpmIv.mjs → PreviewPlugin.native-WuIwOAOR.mjs} +30 -30
- package/dist/SlashCommandsPlugin.native-CmxvMEaE.mjs +755 -0
- package/dist/SmartPastePlugin.native-BOKKtF07.mjs +1398 -0
- package/dist/{SpecialCharactersPlugin.native-DANrbExJ.mjs → SpecialCharactersPlugin.native-CZDato89.mjs} +143 -98
- package/dist/{SpellCheckPlugin.native-C8bPvRHy.mjs → SpellCheckPlugin.native-BZB9AewP.mjs} +239 -219
- package/dist/{TemplatePlugin.native-4lKEm-WY.mjs → TemplatePlugin.native-CrpfKRJ8.mjs} +167 -143
- package/dist/{TextColorPlugin.native-Clgtb50j.mjs → TextColorPlugin.native-Bwl_bSmc.mjs} +134 -118
- package/dist/TrackChangesPlugin.native-Bghu2q4a.mjs +761 -0
- package/dist/TranslationWorkflowPlugin.native-Bz6jDGvj.mjs +1728 -0
- package/dist/VersionDiffPlugin.native-Bvxgy--t.mjs +776 -0
- package/dist/_commonjsHelpers-DOllISpa.mjs +32 -0
- package/dist/anchoredPopover-Bxds0VoB.mjs +110 -0
- package/dist/documentManager-vQ1VkbUY.mjs +8418 -0
- package/dist/editora.min.js +13 -13
- package/dist/editora.umd.js +13 -13
- package/dist/html2canvas.esm-AYkPY5LS.mjs +4803 -0
- package/dist/index-BslAFzmv.mjs +16544 -0
- package/dist/index-D1LOqg5C.js +10 -0
- package/dist/{index-OwnkG39N.mjs → index-DqC57IEH.mjs} +438 -328
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-CuicffkQ.mjs → index.es-BYD2KEo6.mjs} +5 -4
- package/dist/index.esm.js +2 -2
- package/dist/jspdf.es.min-BJGtOnRT.mjs +7890 -0
- package/dist/plugin-loader.js +77 -40
- package/dist/webcomponent-core.js +456 -346
- package/dist/webcomponent-core.min.css +1 -1
- package/dist/webcomponent-core.min.js +87 -107
- package/dist/webcomponent.cjs.js +1 -1
- package/dist/webcomponent.esm.js +1 -1
- package/dist/webcomponent.js +503 -356
- package/dist/webcomponent.min.css +1 -1
- package/dist/webcomponent.min.js +6003 -658
- package/package.json +2 -2
- package/dist/CodePlugin.native-B263UI8O.mjs +0 -2173
- package/dist/MergeTagPlugin.native-DIGWhdnF.mjs +0 -419
- package/dist/colorSelectionApply-CK1My9N2.mjs +0 -67
- package/dist/documentManager-irzj9n3V.mjs +0 -37627
- package/dist/index-CqWQFb3D.js +0 -10
package/dist/{DocumentManagerPlugin.native-BvZL5CSG.mjs → DocumentManagerPlugin.native-C2cs_1w4.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const c = () => ({
|
|
2
2
|
name: "document-manager",
|
|
3
3
|
toolbar: [
|
|
4
4
|
{
|
|
@@ -22,15 +22,15 @@ const i = () => ({
|
|
|
22
22
|
],
|
|
23
23
|
commands: {
|
|
24
24
|
importWord: () => {
|
|
25
|
-
const
|
|
25
|
+
const l = () => {
|
|
26
26
|
const e = window.getSelection();
|
|
27
27
|
if (e && e.rangeCount > 0) {
|
|
28
28
|
let r = e.getRangeAt(0).startContainer;
|
|
29
29
|
for (; r && r !== document.body; ) {
|
|
30
30
|
if (r.nodeType === Node.ELEMENT_NODE) {
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
return
|
|
31
|
+
const d = r;
|
|
32
|
+
if (d.getAttribute("contenteditable") === "true")
|
|
33
|
+
return d;
|
|
34
34
|
}
|
|
35
35
|
r = r.parentNode;
|
|
36
36
|
}
|
|
@@ -38,79 +38,79 @@ const i = () => ({
|
|
|
38
38
|
const n = document.activeElement;
|
|
39
39
|
if ((n == null ? void 0 : n.getAttribute("contenteditable")) === "true")
|
|
40
40
|
return n;
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
},
|
|
44
|
-
return
|
|
45
|
-
var
|
|
46
|
-
const n = (
|
|
41
|
+
const o = n == null ? void 0 : n.closest('[contenteditable="true"]');
|
|
42
|
+
return o || document.querySelector('[contenteditable="true"]');
|
|
43
|
+
}, t = document.createElement("input");
|
|
44
|
+
return t.type = "file", t.accept = ".docx", t.onchange = async (e) => {
|
|
45
|
+
var o;
|
|
46
|
+
const n = (o = e.target.files) == null ? void 0 : o[0];
|
|
47
47
|
if (n)
|
|
48
48
|
try {
|
|
49
|
-
const r =
|
|
49
|
+
const r = l();
|
|
50
50
|
if (r) {
|
|
51
|
-
const { importFromWord:
|
|
51
|
+
const { importFromWord: d } = await import("./documentManager-vQ1VkbUY.mjs"), a = await d(n);
|
|
52
52
|
r.innerHTML = a, r.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
53
53
|
}
|
|
54
54
|
} catch (r) {
|
|
55
55
|
console.error("Import failed:", r), alert("Failed to import Word document. Please check the console for details.");
|
|
56
56
|
}
|
|
57
|
-
},
|
|
57
|
+
}, t.click(), !0;
|
|
58
58
|
},
|
|
59
59
|
exportWord: async () => {
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
let
|
|
64
|
-
for (;
|
|
65
|
-
if (
|
|
66
|
-
return
|
|
67
|
-
|
|
60
|
+
const l = () => {
|
|
61
|
+
const t = window.getSelection();
|
|
62
|
+
if (t && t.rangeCount > 0) {
|
|
63
|
+
let o = t.getRangeAt(0).startContainer;
|
|
64
|
+
for (; o && o !== document.body; ) {
|
|
65
|
+
if (o.nodeType === Node.ELEMENT_NODE && o.getAttribute("contenteditable") === "true")
|
|
66
|
+
return o;
|
|
67
|
+
o = o.parentNode;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
const e = document.activeElement;
|
|
71
71
|
return (e == null ? void 0 : e.getAttribute("contenteditable")) === "true" ? e : (e == null ? void 0 : e.closest('[contenteditable="true"]')) || document.querySelector('[contenteditable="true"]');
|
|
72
72
|
};
|
|
73
73
|
try {
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
const e =
|
|
74
|
+
const t = l();
|
|
75
|
+
if (t) {
|
|
76
|
+
const e = t.innerHTML, { exportToWord: n } = await import("./documentManager-vQ1VkbUY.mjs");
|
|
77
77
|
await n(e, "document.docx");
|
|
78
78
|
}
|
|
79
79
|
return !0;
|
|
80
|
-
} catch (
|
|
81
|
-
return console.error("Export failed:",
|
|
80
|
+
} catch (t) {
|
|
81
|
+
return console.error("Export failed:", t), alert("Failed to export to Word. Please check the console for details."), !1;
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
exportPdf: async () => {
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
88
|
-
let
|
|
89
|
-
for (;
|
|
90
|
-
if (
|
|
91
|
-
return
|
|
92
|
-
|
|
85
|
+
const l = () => {
|
|
86
|
+
const t = window.getSelection();
|
|
87
|
+
if (t && t.rangeCount > 0) {
|
|
88
|
+
let o = t.getRangeAt(0).startContainer;
|
|
89
|
+
for (; o && o !== document.body; ) {
|
|
90
|
+
if (o.nodeType === Node.ELEMENT_NODE && o.getAttribute("contenteditable") === "true")
|
|
91
|
+
return o;
|
|
92
|
+
o = o.parentNode;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
const e = document.activeElement;
|
|
96
96
|
return (e == null ? void 0 : e.getAttribute("contenteditable")) === "true" ? e : (e == null ? void 0 : e.closest('[contenteditable="true"]')) || document.querySelector('[contenteditable="true"]');
|
|
97
97
|
};
|
|
98
98
|
try {
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
const e =
|
|
102
|
-
await n(e, "document.pdf",
|
|
99
|
+
const t = l();
|
|
100
|
+
if (t) {
|
|
101
|
+
const e = t.innerHTML, { exportToPdf: n } = await import("./documentManager-vQ1VkbUY.mjs");
|
|
102
|
+
await n(e, "document.pdf", t);
|
|
103
103
|
} else
|
|
104
104
|
console.error("PDF Export: No editor element found"), alert("No active editor found. Please click in the editor area first.");
|
|
105
105
|
return !0;
|
|
106
|
-
} catch (
|
|
107
|
-
return console.error("PDF Export: Export failed:",
|
|
106
|
+
} catch (t) {
|
|
107
|
+
return console.error("PDF Export: Export failed:", t), alert("Failed to export to PDF. Please check the console for details."), !1;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
keymap: {}
|
|
112
112
|
});
|
|
113
113
|
export {
|
|
114
|
-
|
|
114
|
+
c as DocumentManagerPlugin
|
|
115
115
|
};
|
|
116
|
-
//# sourceMappingURL=DocumentManagerPlugin.native-
|
|
116
|
+
//# sourceMappingURL=DocumentManagerPlugin.native-C2cs_1w4.mjs.map
|
package/dist/{EmbedIframePlugin.native-CSWIB1jm.mjs → EmbedIframePlugin.native-DKJx2OS7.mjs}
RENAMED
|
@@ -6,6 +6,7 @@ const D = [
|
|
|
6
6
|
{ label: "Responsive - 1x1", value: "1x1" }
|
|
7
7
|
], u = '[data-theme="dark"], .dark, .editora-theme-dark', h = /* @__PURE__ */ new WeakMap(), s = (e) => (h.has(e) || h.set(e, {
|
|
8
8
|
dialogElement: null,
|
|
9
|
+
escapeHandler: null,
|
|
9
10
|
activeTab: "general",
|
|
10
11
|
formData: {
|
|
11
12
|
src: "",
|
|
@@ -27,7 +28,7 @@ function q(e) {
|
|
|
27
28
|
const t = document.activeElement;
|
|
28
29
|
return t != null && t.closest(u) ? !0 : document.body.matches(u) || document.documentElement.matches(u);
|
|
29
30
|
}
|
|
30
|
-
const
|
|
31
|
+
const A = () => ({
|
|
31
32
|
name: "embedIframe",
|
|
32
33
|
toolbar: [
|
|
33
34
|
{
|
|
@@ -39,16 +40,16 @@ const H = () => ({
|
|
|
39
40
|
}
|
|
40
41
|
],
|
|
41
42
|
commands: {
|
|
42
|
-
openEmbedIframeDialog: (e) => (
|
|
43
|
+
openEmbedIframeDialog: (e) => (L(e), !0)
|
|
43
44
|
},
|
|
44
45
|
keymap: {
|
|
45
46
|
"Mod-Shift-e": "openEmbedIframeDialog"
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
|
-
function
|
|
49
|
+
function L(e) {
|
|
49
50
|
if (!e) {
|
|
50
|
-
const
|
|
51
|
-
|
|
51
|
+
const a = document.activeElement;
|
|
52
|
+
a && a.closest("[data-editora-editor]") && (e = a.closest("[data-editora-editor]"));
|
|
52
53
|
}
|
|
53
54
|
if (e || (e = document.querySelector("[data-editora-editor]")), !e) {
|
|
54
55
|
console.warn("Editor element not found");
|
|
@@ -68,10 +69,10 @@ function C(e) {
|
|
|
68
69
|
showBorder: !0,
|
|
69
70
|
enableScrollbar: !0
|
|
70
71
|
}, t.activeTab = "general";
|
|
71
|
-
const
|
|
72
|
-
|
|
72
|
+
const o = document.createElement("div");
|
|
73
|
+
o.className = "rte-dialog-overlay rte-embed-iframe-overlay", q(e) && o.classList.add("rte-theme-dark"), o.onclick = () => p(e);
|
|
73
74
|
const r = document.createElement("div");
|
|
74
|
-
r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (
|
|
75
|
+
r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (a) => a.stopPropagation(), r.innerHTML = `
|
|
75
76
|
<div class="rte-dialog-header">
|
|
76
77
|
<h3>Embed Iframe</h3>
|
|
77
78
|
<button class="rte-dialog-close">×</button>
|
|
@@ -91,7 +92,7 @@ function C(e) {
|
|
|
91
92
|
<div class="rte-form-group">
|
|
92
93
|
<label class="rte-form-label">Size</label>
|
|
93
94
|
<select class="rte-form-select" id="iframe-size">
|
|
94
|
-
${D.map((
|
|
95
|
+
${D.map((a) => `<option value="${a.value}">${a.label}</option>`).join("")}
|
|
95
96
|
</select>
|
|
96
97
|
</div>
|
|
97
98
|
<div class="rte-form-row" id="dimensions-row">
|
|
@@ -145,71 +146,73 @@ function C(e) {
|
|
|
145
146
|
<button type="button" class="rte-btn rte-btn-secondary" id="cancel-btn">Cancel</button>
|
|
146
147
|
<button type="submit" class="rte-btn rte-btn-primary" id="save-btn">Save</button>
|
|
147
148
|
</div>
|
|
148
|
-
`,
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
`, o.appendChild(r), document.body.appendChild(o), t.dialogElement = o, t.escapeHandler = (a) => {
|
|
150
|
+
a.key === "Escape" && (a.preventDefault(), a.stopPropagation(), p(e));
|
|
151
|
+
}, document.addEventListener("keydown", t.escapeHandler, !0), $(r, e), T(), setTimeout(() => {
|
|
152
|
+
var a;
|
|
153
|
+
(a = r.querySelector("#iframe-src")) == null || a.focus();
|
|
151
154
|
}, 100);
|
|
152
155
|
}
|
|
153
|
-
function
|
|
156
|
+
function $(e, t) {
|
|
154
157
|
var l, i, d, f;
|
|
155
158
|
s(t), (l = e.querySelector(".rte-dialog-close")) == null || l.addEventListener("click", () => p(t)), e.querySelectorAll(".rte-tab-button").forEach((n) => {
|
|
156
159
|
n.addEventListener("click", (m) => {
|
|
157
160
|
const c = m.target.getAttribute("data-tab");
|
|
158
|
-
c &&
|
|
161
|
+
c && C(e, c, t);
|
|
159
162
|
});
|
|
160
163
|
});
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
const r = e.querySelector("#iframe-width"),
|
|
164
|
-
r == null || r.addEventListener("input", (n) =>
|
|
164
|
+
const o = e.querySelector("#iframe-size");
|
|
165
|
+
o == null || o.addEventListener("change", (n) => H(e, n.target.value, t));
|
|
166
|
+
const r = e.querySelector("#iframe-width"), a = e.querySelector("#iframe-height");
|
|
167
|
+
r == null || r.addEventListener("input", (n) => z(e, n.target.value, t)), a == null || a.addEventListener("input", (n) => E(e, n.target.value, t)), (i = e.querySelector("#constrain-btn")) == null || i.addEventListener("click", () => I(e, t)), (d = e.querySelector("#cancel-btn")) == null || d.addEventListener("click", () => p(t)), (f = e.querySelector("#save-btn")) == null || f.addEventListener("click", () => P(e, t));
|
|
165
168
|
}
|
|
166
|
-
function
|
|
167
|
-
const r = s(
|
|
168
|
-
r.activeTab = t, e.querySelectorAll(".rte-tab-button").forEach((
|
|
169
|
-
|
|
170
|
-
}), e.querySelectorAll(".rte-tab-panel").forEach((
|
|
171
|
-
|
|
169
|
+
function C(e, t, o) {
|
|
170
|
+
const r = s(o);
|
|
171
|
+
r.activeTab = t, e.querySelectorAll(".rte-tab-button").forEach((a) => {
|
|
172
|
+
a.classList.toggle("active", a.getAttribute("data-tab") === t);
|
|
173
|
+
}), e.querySelectorAll(".rte-tab-panel").forEach((a) => {
|
|
174
|
+
a.style.display = a.getAttribute("data-panel") === t ? "block" : "none";
|
|
172
175
|
});
|
|
173
176
|
}
|
|
174
|
-
function
|
|
175
|
-
const r = s(
|
|
177
|
+
function H(e, t, o) {
|
|
178
|
+
const r = s(o);
|
|
176
179
|
r.formData.selectedSize = t;
|
|
177
|
-
const
|
|
178
|
-
t === "inline" ? (
|
|
180
|
+
const a = e.querySelector("#dimensions-row"), l = e.querySelector("#iframe-width"), i = e.querySelector("#iframe-height");
|
|
181
|
+
t === "inline" ? (a.style.display = "flex", l.value = "100%", i.value = "400px", r.formData.width = "100%", r.formData.height = "400px") : (a.style.display = "none", r.formData.width = "100%", r.formData.height = "auto");
|
|
179
182
|
}
|
|
180
|
-
function
|
|
181
|
-
const r = s(
|
|
183
|
+
function z(e, t, o) {
|
|
184
|
+
const r = s(o);
|
|
182
185
|
if (r.formData.width = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
|
|
183
|
-
const
|
|
184
|
-
if (!isNaN(
|
|
185
|
-
const l =
|
|
186
|
+
const a = parseFloat(t);
|
|
187
|
+
if (!isNaN(a)) {
|
|
188
|
+
const l = a * 9 / 16;
|
|
186
189
|
r.formData.height = `${l}px`;
|
|
187
190
|
const i = e.querySelector("#iframe-height");
|
|
188
191
|
i && (i.value = r.formData.height);
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
|
-
function
|
|
193
|
-
const r = s(
|
|
195
|
+
function E(e, t, o) {
|
|
196
|
+
const r = s(o);
|
|
194
197
|
if (r.formData.height = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
|
|
195
|
-
const
|
|
196
|
-
if (!isNaN(
|
|
197
|
-
const l =
|
|
198
|
+
const a = parseFloat(t);
|
|
199
|
+
if (!isNaN(a)) {
|
|
200
|
+
const l = a * 16 / 9;
|
|
198
201
|
r.formData.width = `${l}px`;
|
|
199
202
|
const i = e.querySelector("#iframe-width");
|
|
200
203
|
i && (i.value = r.formData.width);
|
|
201
204
|
}
|
|
202
205
|
}
|
|
203
206
|
}
|
|
204
|
-
function
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
+
function I(e, t) {
|
|
208
|
+
const o = s(t);
|
|
209
|
+
o.formData.constrainProportions = !o.formData.constrainProportions;
|
|
207
210
|
const r = e.querySelector("#constrain-btn");
|
|
208
|
-
r && (r.textContent =
|
|
211
|
+
r && (r.textContent = o.formData.constrainProportions ? "🔒" : "🔓", r.className = `rte-constrain-btn ${o.formData.constrainProportions ? "locked" : "unlocked"}`, r.title = o.formData.constrainProportions ? "Unlock proportions" : "Lock proportions");
|
|
209
212
|
}
|
|
210
213
|
function P(e, t) {
|
|
211
214
|
var c, b, g, v, x, y, k, w, S;
|
|
212
|
-
const
|
|
215
|
+
const o = s(t), r = (c = e.querySelector("#iframe-src")) == null ? void 0 : c.value.trim();
|
|
213
216
|
if (!r) {
|
|
214
217
|
alert("Please enter a source URL");
|
|
215
218
|
return;
|
|
@@ -218,25 +221,25 @@ function P(e, t) {
|
|
|
218
221
|
alert("Please enter a valid URL starting with https:// or http://");
|
|
219
222
|
return;
|
|
220
223
|
}
|
|
221
|
-
const
|
|
224
|
+
const a = (b = e.querySelector("#iframe-name")) == null ? void 0 : b.value.trim(), l = (g = e.querySelector("#iframe-title")) == null ? void 0 : g.value.trim(), i = (v = e.querySelector("#iframe-longdesc")) == null ? void 0 : v.value.trim();
|
|
222
225
|
(x = e.querySelector("#iframe-desc-url")) == null || x.value.trim();
|
|
223
226
|
const d = (k = (y = e.querySelector("#iframe-border")) == null ? void 0 : y.checked) != null ? k : !0, f = (S = (w = e.querySelector("#iframe-scrollbar")) == null ? void 0 : w.checked) != null ? S : !0;
|
|
224
|
-
let n =
|
|
225
|
-
|
|
227
|
+
let n = o.formData.width, m = o.formData.height;
|
|
228
|
+
o.formData.selectedSize !== "inline" && (n = "100%", m = "auto"), R(t, {
|
|
226
229
|
src: r,
|
|
227
230
|
width: n,
|
|
228
231
|
height: m,
|
|
229
|
-
aspectRatio:
|
|
230
|
-
name:
|
|
232
|
+
aspectRatio: o.formData.selectedSize,
|
|
233
|
+
name: a || void 0,
|
|
231
234
|
title: l || void 0,
|
|
232
235
|
longDescription: i || void 0,
|
|
233
236
|
showBorder: d,
|
|
234
237
|
enableScrollbar: f
|
|
235
238
|
}), p(t);
|
|
236
239
|
}
|
|
237
|
-
function
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
+
function R(e, t) {
|
|
241
|
+
const o = e.querySelector('[contenteditable="true"]');
|
|
242
|
+
o && (o.focus(), setTimeout(() => {
|
|
240
243
|
const r = [
|
|
241
244
|
`src="${t.src}"`,
|
|
242
245
|
`width="${t.width}"`,
|
|
@@ -246,9 +249,9 @@ function T(e, t) {
|
|
|
246
249
|
`scrolling="${t.enableScrollbar ? "auto" : "no"}"`
|
|
247
250
|
];
|
|
248
251
|
t.name && r.push(`name="${t.name}"`), t.title && r.push(`title="${t.title}"`), t.longDescription && r.push(`longdesc="${t.longDescription}"`);
|
|
249
|
-
const
|
|
250
|
-
t.aspectRatio !== "inline" &&
|
|
251
|
-
const l =
|
|
252
|
+
const a = [];
|
|
253
|
+
t.aspectRatio !== "inline" && a.push(`rte-iframe-${t.aspectRatio}`);
|
|
254
|
+
const l = a.length > 0 ? `class="${a.join(" ")}"` : "", i = `data-aspect-ratio="${t.aspectRatio}"`, d = `<iframe ${r.join(" ")} ${l} ${i}></iframe>`;
|
|
252
255
|
if (!document.execCommand("insertHTML", !1, d)) {
|
|
253
256
|
const n = window.getSelection();
|
|
254
257
|
if (n && n.rangeCount > 0) {
|
|
@@ -266,9 +269,9 @@ function T(e, t) {
|
|
|
266
269
|
}
|
|
267
270
|
function p(e) {
|
|
268
271
|
const t = s(e);
|
|
269
|
-
t.
|
|
272
|
+
t.escapeHandler && (document.removeEventListener("keydown", t.escapeHandler, !0), t.escapeHandler = null), t.dialogElement && (t.dialogElement.remove(), t.dialogElement = null);
|
|
270
273
|
}
|
|
271
|
-
function
|
|
274
|
+
function T() {
|
|
272
275
|
if (document.getElementById("embed-iframe-dialog-styles")) return;
|
|
273
276
|
const e = document.createElement("style");
|
|
274
277
|
e.id = "embed-iframe-dialog-styles", e.textContent = `
|
|
@@ -560,6 +563,6 @@ function A() {
|
|
|
560
563
|
`, document.head.appendChild(e);
|
|
561
564
|
}
|
|
562
565
|
export {
|
|
563
|
-
|
|
566
|
+
A as EmbedIframePlugin
|
|
564
567
|
};
|
|
565
|
-
//# sourceMappingURL=EmbedIframePlugin.native-
|
|
568
|
+
//# sourceMappingURL=EmbedIframePlugin.native-DKJx2OS7.mjs.map
|