@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
|
@@ -1,568 +0,0 @@
|
|
|
1
|
-
const q = [
|
|
2
|
-
{ label: "Inline Value", value: "inline" },
|
|
3
|
-
{ label: "Responsive - 21x9", value: "21x9" },
|
|
4
|
-
{ label: "Responsive - 16x9", value: "16x9" },
|
|
5
|
-
{ label: "Responsive - 4x3", value: "4x3" },
|
|
6
|
-
{ label: "Responsive - 1x1", value: "1x1" }
|
|
7
|
-
], u = '[data-theme="dark"], .dark, .editora-theme-dark', h = /* @__PURE__ */ new WeakMap(), s = (e) => (h.has(e) || h.set(e, {
|
|
8
|
-
dialogElement: null,
|
|
9
|
-
escapeHandler: null,
|
|
10
|
-
activeTab: "general",
|
|
11
|
-
formData: {
|
|
12
|
-
src: "",
|
|
13
|
-
selectedSize: "inline",
|
|
14
|
-
width: "100%",
|
|
15
|
-
height: "400px",
|
|
16
|
-
constrainProportions: !0,
|
|
17
|
-
name: "",
|
|
18
|
-
title: "",
|
|
19
|
-
longDescription: "",
|
|
20
|
-
descriptionUrl: "",
|
|
21
|
-
showBorder: !0,
|
|
22
|
-
enableScrollbar: !0
|
|
23
|
-
}
|
|
24
|
-
}), h.get(e));
|
|
25
|
-
function L(e) {
|
|
26
|
-
if (e != null && e.matches(u) || e != null && e.closest(u))
|
|
27
|
-
return !0;
|
|
28
|
-
const t = document.activeElement;
|
|
29
|
-
return t != null && t.closest(u) ? !0 : document.body.matches(u) || document.documentElement.matches(u);
|
|
30
|
-
}
|
|
31
|
-
const N = () => ({
|
|
32
|
-
name: "embedIframe",
|
|
33
|
-
toolbar: [
|
|
34
|
-
{
|
|
35
|
-
label: "Embed Content",
|
|
36
|
-
command: "openEmbedIframeDialog",
|
|
37
|
-
icon: '<svg width="24" height="24" focusable="false"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6Zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4Zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6Zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3Zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2Zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2Z" fill-rule="nonzero"></path></svg>',
|
|
38
|
-
shortcut: "Mod-Shift-e",
|
|
39
|
-
type: "button"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
commands: {
|
|
43
|
-
openEmbedIframeDialog: (e) => ($(e), !0)
|
|
44
|
-
},
|
|
45
|
-
keymap: {
|
|
46
|
-
"Mod-Shift-e": "openEmbedIframeDialog"
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
function $(e) {
|
|
50
|
-
if (!e) {
|
|
51
|
-
const o = document.activeElement;
|
|
52
|
-
o && o.closest("[data-editora-editor]") && (e = o.closest("[data-editora-editor]"));
|
|
53
|
-
}
|
|
54
|
-
if (e || (e = document.querySelector("[data-editora-editor]")), !e) {
|
|
55
|
-
console.warn("Editor element not found");
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const t = s(e);
|
|
59
|
-
t.formData = {
|
|
60
|
-
src: "",
|
|
61
|
-
selectedSize: "inline",
|
|
62
|
-
width: "100%",
|
|
63
|
-
height: "400px",
|
|
64
|
-
constrainProportions: !0,
|
|
65
|
-
name: "",
|
|
66
|
-
title: "",
|
|
67
|
-
longDescription: "",
|
|
68
|
-
descriptionUrl: "",
|
|
69
|
-
showBorder: !0,
|
|
70
|
-
enableScrollbar: !0
|
|
71
|
-
}, t.activeTab = "general";
|
|
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
|
-
const r = document.createElement("div");
|
|
75
|
-
r.className = "rte-dialog-content embed-iframe-dialog", r.onclick = (o) => o.stopPropagation(), r.innerHTML = `
|
|
76
|
-
<div class="rte-dialog-header">
|
|
77
|
-
<h3>Embed Iframe</h3>
|
|
78
|
-
<button class="rte-dialog-close">×</button>
|
|
79
|
-
</div>
|
|
80
|
-
<div class="rte-dialog-body">
|
|
81
|
-
<div class="rte-vertical-tabs">
|
|
82
|
-
<div class="rte-tab-buttons">
|
|
83
|
-
<button class="rte-tab-button active" data-tab="general">General</button>
|
|
84
|
-
<button class="rte-tab-button" data-tab="advanced">Advanced</button>
|
|
85
|
-
</div>
|
|
86
|
-
<div class="rte-tab-content">
|
|
87
|
-
<div class="rte-tab-panel" data-panel="general" style="display: block;">
|
|
88
|
-
<div class="rte-form-group">
|
|
89
|
-
<label class="rte-form-label">Source</label>
|
|
90
|
-
<input type="url" class="rte-form-input" id="iframe-src" placeholder="https://example.com" required />
|
|
91
|
-
</div>
|
|
92
|
-
<div class="rte-form-group">
|
|
93
|
-
<label class="rte-form-label">Size</label>
|
|
94
|
-
<select class="rte-form-select" id="iframe-size">
|
|
95
|
-
${q.map((o) => `<option value="${o.value}">${o.label}</option>`).join("")}
|
|
96
|
-
</select>
|
|
97
|
-
</div>
|
|
98
|
-
<div class="rte-form-row" id="dimensions-row">
|
|
99
|
-
<div class="rte-form-group">
|
|
100
|
-
<label class="rte-form-label">Width</label>
|
|
101
|
-
<input type="text" class="rte-form-input" id="iframe-width" placeholder="100%" value="100%" />
|
|
102
|
-
</div>
|
|
103
|
-
<div class="rte-form-group">
|
|
104
|
-
<label class="rte-form-label">Height</label>
|
|
105
|
-
<input type="text" class="rte-form-input" id="iframe-height" placeholder="400px" value="400px" />
|
|
106
|
-
</div>
|
|
107
|
-
<div class="rte-form-group constrain-group">
|
|
108
|
-
<button type="button" class="rte-constrain-btn locked" id="constrain-btn" title="Unlock proportions">🔒</button>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<div class="rte-tab-panel" data-panel="advanced" style="display: none;">
|
|
113
|
-
<div class="rte-form-group">
|
|
114
|
-
<label class="rte-form-label">Name</label>
|
|
115
|
-
<input type="text" class="rte-form-input" id="iframe-name" placeholder="Iframe name" />
|
|
116
|
-
</div>
|
|
117
|
-
<div class="rte-form-group">
|
|
118
|
-
<label class="rte-form-label">Title</label>
|
|
119
|
-
<input type="text" class="rte-form-input" id="iframe-title" placeholder="Iframe title" />
|
|
120
|
-
</div>
|
|
121
|
-
<div class="rte-form-group">
|
|
122
|
-
<label class="rte-form-label">Long Description</label>
|
|
123
|
-
<textarea class="rte-form-textarea" id="iframe-longdesc" placeholder="Detailed description of the iframe content" rows="3"></textarea>
|
|
124
|
-
</div>
|
|
125
|
-
<div class="rte-form-group">
|
|
126
|
-
<label class="rte-form-label">Description URL</label>
|
|
127
|
-
<input type="url" class="rte-form-input" id="iframe-desc-url" placeholder="https://example.com/description" />
|
|
128
|
-
</div>
|
|
129
|
-
<div class="rte-form-group">
|
|
130
|
-
<label class="rte-checkbox-label">
|
|
131
|
-
<input type="checkbox" id="iframe-border" checked />
|
|
132
|
-
Show iframe border
|
|
133
|
-
</label>
|
|
134
|
-
</div>
|
|
135
|
-
<div class="rte-form-group">
|
|
136
|
-
<label class="rte-checkbox-label">
|
|
137
|
-
<input type="checkbox" id="iframe-scrollbar" checked />
|
|
138
|
-
Enable scrollbar
|
|
139
|
-
</label>
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
<div class="rte-dialog-footer">
|
|
146
|
-
<button type="button" class="rte-btn rte-btn-secondary" id="cancel-btn">Cancel</button>
|
|
147
|
-
<button type="submit" class="rte-btn rte-btn-primary" id="save-btn">Save</button>
|
|
148
|
-
</div>
|
|
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
|
-
}, 100);
|
|
155
|
-
}
|
|
156
|
-
function C(e, t) {
|
|
157
|
-
var l, i, d, f;
|
|
158
|
-
s(t), (l = e.querySelector(".rte-dialog-close")) == null || l.addEventListener("click", () => p(t)), e.querySelectorAll(".rte-tab-button").forEach((n) => {
|
|
159
|
-
n.addEventListener("click", (m) => {
|
|
160
|
-
const c = m.target.getAttribute("data-tab");
|
|
161
|
-
c && H(e, c, t);
|
|
162
|
-
});
|
|
163
|
-
});
|
|
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
|
-
}
|
|
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
|
-
});
|
|
176
|
-
}
|
|
177
|
-
function z(e, t, a) {
|
|
178
|
-
const r = s(a);
|
|
179
|
-
r.formData.selectedSize = t;
|
|
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
|
-
}
|
|
183
|
-
function E(e, t, a) {
|
|
184
|
-
const r = s(a);
|
|
185
|
-
if (r.formData.width = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
|
|
186
|
-
const o = parseFloat(t);
|
|
187
|
-
if (!isNaN(o)) {
|
|
188
|
-
const l = o * 9 / 16;
|
|
189
|
-
r.formData.height = `${l}px`;
|
|
190
|
-
const i = e.querySelector("#iframe-height");
|
|
191
|
-
i && (i.value = r.formData.height);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function I(e, t, a) {
|
|
196
|
-
const r = s(a);
|
|
197
|
-
if (r.formData.height = t, r.formData.constrainProportions && r.formData.selectedSize === "inline") {
|
|
198
|
-
const o = parseFloat(t);
|
|
199
|
-
if (!isNaN(o)) {
|
|
200
|
-
const l = o * 16 / 9;
|
|
201
|
-
r.formData.width = `${l}px`;
|
|
202
|
-
const i = e.querySelector("#iframe-width");
|
|
203
|
-
i && (i.value = r.formData.width);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
function P(e, t) {
|
|
208
|
-
const a = s(t);
|
|
209
|
-
a.formData.constrainProportions = !a.formData.constrainProportions;
|
|
210
|
-
const r = e.querySelector("#constrain-btn");
|
|
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
|
-
}
|
|
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
|
-
if (!r) {
|
|
217
|
-
alert("Please enter a source URL");
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if (!r.startsWith("https://") && !r.startsWith("http://")) {
|
|
221
|
-
alert("Please enter a valid URL starting with https:// or http://");
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
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, {
|
|
227
|
-
src: r,
|
|
228
|
-
width: m,
|
|
229
|
-
height: c,
|
|
230
|
-
aspectRatio: a.formData.selectedSize,
|
|
231
|
-
name: o || void 0,
|
|
232
|
-
title: l || void 0,
|
|
233
|
-
longDescription: i || void 0,
|
|
234
|
-
descriptionUrl: d || void 0,
|
|
235
|
-
showBorder: f,
|
|
236
|
-
enableScrollbar: n
|
|
237
|
-
}), p(t);
|
|
238
|
-
}
|
|
239
|
-
function T(e, t) {
|
|
240
|
-
const a = e.querySelector('[contenteditable="true"]');
|
|
241
|
-
a && (a.focus(), setTimeout(() => {
|
|
242
|
-
const r = [
|
|
243
|
-
`src="${t.src}"`,
|
|
244
|
-
`width="${t.width}"`,
|
|
245
|
-
`height="${t.height}"`,
|
|
246
|
-
"allowfullscreen",
|
|
247
|
-
`frameborder="${t.showBorder ? "1" : "0"}"`,
|
|
248
|
-
`scrolling="${t.enableScrollbar ? "auto" : "no"}"`
|
|
249
|
-
];
|
|
250
|
-
t.name && r.push(`name="${t.name}"`), t.title && r.push(`title="${t.title}"`), t.longDescription && r.push(`longdesc="${t.longDescription}"`);
|
|
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>`;
|
|
254
|
-
if (!document.execCommand("insertHTML", !1, d)) {
|
|
255
|
-
const n = window.getSelection();
|
|
256
|
-
if (n && n.rangeCount > 0) {
|
|
257
|
-
const m = n.getRangeAt(0);
|
|
258
|
-
m.deleteContents();
|
|
259
|
-
const c = document.createElement("div");
|
|
260
|
-
c.innerHTML = d;
|
|
261
|
-
const b = document.createDocumentFragment();
|
|
262
|
-
for (; c.firstChild; )
|
|
263
|
-
b.appendChild(c.firstChild);
|
|
264
|
-
m.insertNode(b);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}, 10));
|
|
268
|
-
}
|
|
269
|
-
function p(e) {
|
|
270
|
-
const t = s(e);
|
|
271
|
-
t.escapeHandler && (document.removeEventListener("keydown", t.escapeHandler, !0), t.escapeHandler = null), t.dialogElement && (t.dialogElement.remove(), t.dialogElement = null);
|
|
272
|
-
}
|
|
273
|
-
function A() {
|
|
274
|
-
if (document.getElementById("embed-iframe-dialog-styles"))
|
|
275
|
-
return;
|
|
276
|
-
const e = document.createElement("style");
|
|
277
|
-
e.id = "embed-iframe-dialog-styles", e.textContent = `
|
|
278
|
-
/* Embed Iframe Dialog Styles */
|
|
279
|
-
.embed-iframe-dialog {
|
|
280
|
-
max-width: 600px;
|
|
281
|
-
width: 100%;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.rte-vertical-tabs {
|
|
285
|
-
display: flex;
|
|
286
|
-
gap: 20px;
|
|
287
|
-
min-height: 400px;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.rte-tab-buttons {
|
|
291
|
-
display: flex;
|
|
292
|
-
flex-direction: column;
|
|
293
|
-
width: 120px;
|
|
294
|
-
border-right: 1px solid #e1e5e9;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.rte-tab-button {
|
|
298
|
-
padding: 12px 16px;
|
|
299
|
-
border: none;
|
|
300
|
-
background: none;
|
|
301
|
-
text-align: left;
|
|
302
|
-
cursor: pointer;
|
|
303
|
-
font-size: 14px;
|
|
304
|
-
font-weight: 500;
|
|
305
|
-
color: #666;
|
|
306
|
-
border-right: 3px solid transparent;
|
|
307
|
-
transition: all 0.2s ease;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.rte-tab-button:hover {
|
|
311
|
-
background-color: #f8f9fa;
|
|
312
|
-
color: #333;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.rte-tab-button.active {
|
|
316
|
-
background-color: #e3f2fd;
|
|
317
|
-
color: #1976d2;
|
|
318
|
-
border-right-color: #1976d2;
|
|
319
|
-
font-weight: 600;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.rte-tab-content {
|
|
323
|
-
flex: 1;
|
|
324
|
-
padding: 0 0 0 20px;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.rte-tab-panel {
|
|
328
|
-
padding: 0;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.rte-form-group {
|
|
332
|
-
margin-bottom: 16px;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.rte-form-label {
|
|
336
|
-
display: block;
|
|
337
|
-
margin-bottom: 6px;
|
|
338
|
-
font-size: 14px;
|
|
339
|
-
font-weight: 500;
|
|
340
|
-
color: #333;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.rte-form-textarea,
|
|
344
|
-
.rte-form-input,
|
|
345
|
-
.rte-form-select {
|
|
346
|
-
width: 100%;
|
|
347
|
-
padding: 8px 12px;
|
|
348
|
-
border: 1px solid #ccc;
|
|
349
|
-
border-radius: 4px;
|
|
350
|
-
font-size: 14px;
|
|
351
|
-
transition: border-color 0.2s ease;
|
|
352
|
-
box-sizing: border-box;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.rte-form-textarea:focus,
|
|
356
|
-
.rte-form-input:focus,
|
|
357
|
-
.rte-form-select:focus {
|
|
358
|
-
outline: none;
|
|
359
|
-
border-color: #0066cc;
|
|
360
|
-
box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.rte-form-textarea {
|
|
364
|
-
resize: vertical;
|
|
365
|
-
min-height: 80px;
|
|
366
|
-
font-family: inherit;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.rte-form-row {
|
|
370
|
-
display: flex;
|
|
371
|
-
gap: 12px;
|
|
372
|
-
align-items: flex-end;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.rte-form-row .rte-form-group {
|
|
376
|
-
flex: 1;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.rte-form-row .constrain-group {
|
|
380
|
-
flex: 0 0 auto;
|
|
381
|
-
margin-bottom: 0;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
.rte-constrain-btn {
|
|
385
|
-
padding: 8px 12px;
|
|
386
|
-
border: 1px solid #ddd;
|
|
387
|
-
background: white;
|
|
388
|
-
border-radius: 4px;
|
|
389
|
-
cursor: pointer;
|
|
390
|
-
font-size: 18px;
|
|
391
|
-
transition: all 0.2s ease;
|
|
392
|
-
height: 38px;
|
|
393
|
-
width: 48px;
|
|
394
|
-
display: flex;
|
|
395
|
-
align-items: center;
|
|
396
|
-
justify-content: center;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.rte-constrain-btn:hover {
|
|
400
|
-
background-color: #f5f5f5;
|
|
401
|
-
border-color: #1976d2;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.rte-constrain-btn.locked {
|
|
405
|
-
background-color: #e3f2fd;
|
|
406
|
-
border-color: #1976d2;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.rte-checkbox-label {
|
|
410
|
-
display: flex;
|
|
411
|
-
align-items: center;
|
|
412
|
-
gap: 8px;
|
|
413
|
-
font-size: 14px;
|
|
414
|
-
color: #333;
|
|
415
|
-
cursor: pointer;
|
|
416
|
-
padding: 4px 0;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.rte-checkbox-label input[type="checkbox"] {
|
|
420
|
-
width: 18px;
|
|
421
|
-
height: 18px;
|
|
422
|
-
cursor: pointer;
|
|
423
|
-
accent-color: #0066cc;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
.rte-checkbox-label:hover {
|
|
427
|
-
color: #000;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-dialog-content {
|
|
431
|
-
background: #1f2937;
|
|
432
|
-
border: 1px solid #4b5563;
|
|
433
|
-
color: #e2e8f0;
|
|
434
|
-
box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-dialog-header,
|
|
438
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-dialog-footer {
|
|
439
|
-
background: #222d3a;
|
|
440
|
-
border-color: #3b4657;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-dialog-header h3,
|
|
444
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-form-label,
|
|
445
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-checkbox-label {
|
|
446
|
-
color: #e2e8f0;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-tab-buttons {
|
|
450
|
-
border-right-color: #3b4657;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-tab-button {
|
|
454
|
-
color: #a8b5c8;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-tab-button:hover {
|
|
458
|
-
background: #334155;
|
|
459
|
-
color: #f8fafc;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-tab-button.active {
|
|
463
|
-
background: rgba(88, 166, 255, 0.18);
|
|
464
|
-
color: #8cc6ff;
|
|
465
|
-
border-right-color: #58a6ff;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-form-input,
|
|
469
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-form-select,
|
|
470
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-form-textarea {
|
|
471
|
-
background: #111827;
|
|
472
|
-
border-color: #4b5563;
|
|
473
|
-
color: #e2e8f0;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-form-input::placeholder,
|
|
477
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-form-textarea::placeholder {
|
|
478
|
-
color: #94a3b8;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-form-input:focus,
|
|
482
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-form-select:focus,
|
|
483
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-form-textarea:focus {
|
|
484
|
-
border-color: #58a6ff;
|
|
485
|
-
box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.28);
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-constrain-btn {
|
|
489
|
-
background: #111827;
|
|
490
|
-
border-color: #4b5563;
|
|
491
|
-
color: #e2e8f0;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-constrain-btn:hover {
|
|
495
|
-
background: #334155;
|
|
496
|
-
border-color: #58a6ff;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-constrain-btn.locked {
|
|
500
|
-
background: rgba(88, 166, 255, 0.22);
|
|
501
|
-
border-color: #58a6ff;
|
|
502
|
-
color: #d9ecff;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-btn-secondary {
|
|
506
|
-
background: #334155;
|
|
507
|
-
border-color: #4b5563;
|
|
508
|
-
color: #e2e8f0;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-btn-secondary:hover {
|
|
512
|
-
background: #475569;
|
|
513
|
-
border-color: #64748b;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-btn-primary {
|
|
517
|
-
background: #3b82f6;
|
|
518
|
-
color: #fff;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
.rte-embed-iframe-overlay.rte-theme-dark .rte-btn-primary:hover {
|
|
522
|
-
background: #2563eb;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
/* Responsive iframe classes */
|
|
526
|
-
.rte-iframe-21x9,
|
|
527
|
-
.rte-iframe-16x9,
|
|
528
|
-
.rte-iframe-4x3,
|
|
529
|
-
.rte-iframe-1x1 {
|
|
530
|
-
position: relative;
|
|
531
|
-
width: 100%;
|
|
532
|
-
padding-bottom: 56.25%;
|
|
533
|
-
height: 0;
|
|
534
|
-
overflow: hidden;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.rte-iframe-21x9 {
|
|
538
|
-
padding-bottom: 42.857%;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
.rte-iframe-16x9 {
|
|
542
|
-
padding-bottom: 56.25%;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
.rte-iframe-4x3 {
|
|
546
|
-
padding-bottom: 75%;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
.rte-iframe-1x1 {
|
|
550
|
-
padding-bottom: 100%;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
.rte-iframe-21x9 iframe,
|
|
554
|
-
.rte-iframe-16x9 iframe,
|
|
555
|
-
.rte-iframe-4x3 iframe,
|
|
556
|
-
.rte-iframe-1x1 iframe {
|
|
557
|
-
position: absolute;
|
|
558
|
-
top: 0;
|
|
559
|
-
left: 0;
|
|
560
|
-
width: 100%;
|
|
561
|
-
height: 100%;
|
|
562
|
-
}
|
|
563
|
-
`, document.head.appendChild(e);
|
|
564
|
-
}
|
|
565
|
-
export {
|
|
566
|
-
N as EmbedIframePlugin
|
|
567
|
-
};
|
|
568
|
-
//# sourceMappingURL=EmbedIframePlugin.native-55209c87.mjs.map
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const t = () => {
|
|
2
|
-
const e = (a) => {
|
|
3
|
-
try {
|
|
4
|
-
return document.execCommand("formatBlock", !1, a), !0;
|
|
5
|
-
} catch (l) {
|
|
6
|
-
return console.error(`Failed to set block type to ${a}:`, l), !1;
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
return {
|
|
10
|
-
name: "heading",
|
|
11
|
-
// Toolbar button configuration with dropdown
|
|
12
|
-
toolbar: [
|
|
13
|
-
{
|
|
14
|
-
label: "Heading",
|
|
15
|
-
command: "setBlockType",
|
|
16
|
-
type: "dropdown",
|
|
17
|
-
options: [
|
|
18
|
-
{ value: "p", label: "Paragraph" },
|
|
19
|
-
{ value: "h1", label: "Heading 1" },
|
|
20
|
-
{ value: "h2", label: "Heading 2" },
|
|
21
|
-
{ value: "h3", label: "Heading 3" },
|
|
22
|
-
{ value: "h4", label: "Heading 4" },
|
|
23
|
-
{ value: "h5", label: "Heading 5" },
|
|
24
|
-
{ value: "h6", label: "Heading 6" }
|
|
25
|
-
],
|
|
26
|
-
icon: '<svg width="24" height="24" focusable="false"><path d="M16.1 8.6 14.2 4l-1.4.5 2.8 7.4c.1.4.5.6.9.6h.1c.4-.1.6-.5.6-.9l1.8-4.8-1.4-.5-1.5 2.3ZM4 11.5h6V10H4v1.5ZM18.5 3v1L17 7l.9.9L20.7 3h-2.2ZM5.5 12h1v7h1v-7h1v-.5h-3V12Zm4 0h1v7h1v-7h1v-.5h-3V12Zm10 1.5a2 2 0 0 0-2-2h-1v7.5h1v-2.7h1a2 2 0 0 0 2-2v-.8Zm-2 1.3h-1v-2.3h1a.8.8 0 1 1 0 1.6v.7Z" fill-rule="evenodd"></path></svg>'
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
// Native command implementations
|
|
30
|
-
commands: {
|
|
31
|
-
/**
|
|
32
|
-
* Set block type to specific heading level or paragraph
|
|
33
|
-
*/
|
|
34
|
-
setBlockType: (a) => a ? e(a) : !1,
|
|
35
|
-
/**
|
|
36
|
-
* Set heading level 1
|
|
37
|
-
*/
|
|
38
|
-
setHeading1: () => e("h1"),
|
|
39
|
-
/**
|
|
40
|
-
* Set heading level 2
|
|
41
|
-
*/
|
|
42
|
-
setHeading2: () => e("h2"),
|
|
43
|
-
/**
|
|
44
|
-
* Set heading level 3
|
|
45
|
-
*/
|
|
46
|
-
setHeading3: () => e("h3"),
|
|
47
|
-
/**
|
|
48
|
-
* Set to paragraph
|
|
49
|
-
*/
|
|
50
|
-
setParagraph: () => e("p")
|
|
51
|
-
},
|
|
52
|
-
// Keyboard shortcuts
|
|
53
|
-
keymap: {
|
|
54
|
-
"Mod-Alt-1": "setHeading1",
|
|
55
|
-
"Mod-Alt-2": "setHeading2",
|
|
56
|
-
"Mod-Alt-3": "setHeading3",
|
|
57
|
-
"Mod-Alt-0": "setParagraph"
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
export {
|
|
62
|
-
t as HeadingPlugin
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=HeadingPlugin.native-e38c4a16.mjs.map
|