ckeditor5-blazor 1.12.0 → 1.12.1
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/dist/elements/editor/utils/query-all-editor-editables.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +18 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/elements/editor/editor.test.ts +3 -3
- package/src/elements/editor/utils/query-all-editor-editables.ts +4 -1
package/dist/index.mjs
CHANGED
|
@@ -861,7 +861,7 @@ function Z(r) {
|
|
|
861
861
|
if (!e)
|
|
862
862
|
return t;
|
|
863
863
|
const n = JSON.parse(e.getAttribute("data-cke-content")) ?? {}, i = document.querySelector(`#${r}_editor`), a = e.getAttribute("data-cke-root-model-element-name");
|
|
864
|
-
|
|
864
|
+
"main" in t ? t.main.modelElement ??= a : i && (t.main = {
|
|
865
865
|
element: i,
|
|
866
866
|
content: n.main || "",
|
|
867
867
|
modelElement: a
|
|
@@ -963,9 +963,9 @@ class gt extends HTMLElement {
|
|
|
963
963
|
const t = JSON.parse(this.getAttribute("data-cke-context")), { customTranslations: e, watchdogConfig: n, config: { plugins: i, ...a } } = t, o = this.getAttribute("data-cke-context-id"), s = this.getAttribute("data-cke-language") ? JSON.parse(this.getAttribute("data-cke-language")) : Q(a.language), { loadedPlugins: c, hasPremium: u } = await G(i ?? []), l = [
|
|
964
964
|
...await Y(s, u),
|
|
965
965
|
X(e || {})
|
|
966
|
-
].filter((
|
|
966
|
+
].filter((E) => !P(E));
|
|
967
967
|
this.contextPromise = (async () => {
|
|
968
|
-
const { ContextWatchdog:
|
|
968
|
+
const { ContextWatchdog: E, Context: b } = await import("ckeditor5"), w = new E(b, {
|
|
969
969
|
crashNumberLimit: 10,
|
|
970
970
|
...n
|
|
971
971
|
});
|
|
@@ -1001,7 +1001,7 @@ class gt extends HTMLElement {
|
|
|
1001
1001
|
class m extends H {
|
|
1002
1002
|
static the = new m();
|
|
1003
1003
|
}
|
|
1004
|
-
class
|
|
1004
|
+
class Et extends HTMLElement {
|
|
1005
1005
|
/**
|
|
1006
1006
|
* Stops observing the editor registry and immediately runs any pending cleanup.
|
|
1007
1007
|
*/
|
|
@@ -1048,8 +1048,8 @@ class bt extends HTMLElement {
|
|
|
1048
1048
|
initialData: a
|
|
1049
1049
|
}
|
|
1050
1050
|
});
|
|
1051
|
-
const
|
|
1052
|
-
c.addEditable(
|
|
1051
|
+
const E = this.querySelector("[data-cke-editable-content]"), b = c.view.createEditable(e, E);
|
|
1052
|
+
c.addEditable(b), u.view.forceRender();
|
|
1053
1053
|
const w = () => {
|
|
1054
1054
|
if (!d.document.getRoot(e)?.isAttached())
|
|
1055
1055
|
return;
|
|
@@ -1082,7 +1082,7 @@ class bt extends HTMLElement {
|
|
|
1082
1082
|
this.interactiveWait?.disconnect(), this.style.display = "none", this.unmountEffect?.(), this.unmountEffect = null;
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
|
-
async function
|
|
1085
|
+
async function bt({
|
|
1086
1086
|
saveDebounceMs: r,
|
|
1087
1087
|
editorId: t,
|
|
1088
1088
|
targetElement: e
|
|
@@ -1222,10 +1222,10 @@ class kt extends HTMLElement {
|
|
|
1222
1222
|
licenseKey: i,
|
|
1223
1223
|
watchdogConfig: a,
|
|
1224
1224
|
config: { plugins: o, ...s }
|
|
1225
|
-
} = t, c = this.getAttribute("data-cke-editor-id"), u = this.getAttribute("data-cke-context-id"), d = JSON.parse(this.getAttribute("data-cke-root-attributes") || "{}"), l = this.getAttribute("data-cke-editable-height") ? Number.parseInt(this.getAttribute("data-cke-editable-height"), 10) : null, f = Number.parseInt(this.getAttribute("data-cke-save-debounce-ms"), 10),
|
|
1225
|
+
} = t, c = this.getAttribute("data-cke-editor-id"), u = this.getAttribute("data-cke-context-id"), d = JSON.parse(this.getAttribute("data-cke-root-attributes") || "{}"), l = this.getAttribute("data-cke-editable-height") ? Number.parseInt(this.getAttribute("data-cke-editable-height"), 10) : null, f = Number.parseInt(this.getAttribute("data-cke-save-debounce-ms"), 10), E = this.hasAttribute("data-cke-watchdog"), b = this.getAttribute("data-cke-language") ? JSON.parse(this.getAttribute("data-cke-language")) : Q(t.config.language), w = await j(n), g = await (u ? C.the.waitFor(u) : null), h = async () => {
|
|
1226
1226
|
const { loadedPlugins: p, hasPremium: I } = await G(o);
|
|
1227
1227
|
p.push(
|
|
1228
|
-
await
|
|
1228
|
+
await bt({
|
|
1229
1229
|
saveDebounceMs: f,
|
|
1230
1230
|
editorId: c,
|
|
1231
1231
|
targetElement: this
|
|
@@ -1234,7 +1234,7 @@ class kt extends HTMLElement {
|
|
|
1234
1234
|
await yt(f)
|
|
1235
1235
|
);
|
|
1236
1236
|
const A = [
|
|
1237
|
-
...await Y(
|
|
1237
|
+
...await Y(b, I),
|
|
1238
1238
|
X(e || {})
|
|
1239
1239
|
].filter((N) => !P(N));
|
|
1240
1240
|
let T = Z(c);
|
|
@@ -1244,12 +1244,12 @@ class kt extends HTMLElement {
|
|
|
1244
1244
|
...s,
|
|
1245
1245
|
licenseKey: i,
|
|
1246
1246
|
plugins: p,
|
|
1247
|
-
language:
|
|
1247
|
+
language: b,
|
|
1248
1248
|
...A.length && {
|
|
1249
1249
|
translations: A
|
|
1250
1250
|
}
|
|
1251
1251
|
};
|
|
1252
|
-
k = M(k), k = S([...A].reverse(),
|
|
1252
|
+
k = M(k), k = S([...A].reverse(), b.ui, k), k = st(w, T, k);
|
|
1253
1253
|
const O = await (async () => g ? (await ut({
|
|
1254
1254
|
context: g,
|
|
1255
1255
|
creator: w,
|
|
@@ -1259,7 +1259,7 @@ class kt extends HTMLElement {
|
|
|
1259
1259
|
N.setAttributes(d, O.model.document.getRoot());
|
|
1260
1260
|
}), V(n) && l && ft(O, l), O;
|
|
1261
1261
|
};
|
|
1262
|
-
if (
|
|
1262
|
+
if (E && !g) {
|
|
1263
1263
|
const p = await pt(h, a);
|
|
1264
1264
|
return p.on("error", (I, { causesRestart: q }) => {
|
|
1265
1265
|
if (q) {
|
|
@@ -1337,7 +1337,7 @@ const It = {
|
|
|
1337
1337
|
"cke5-editor": kt,
|
|
1338
1338
|
"cke5-context": gt,
|
|
1339
1339
|
"cke5-ui-part": At,
|
|
1340
|
-
"cke5-editable":
|
|
1340
|
+
"cke5-editable": Et
|
|
1341
1341
|
};
|
|
1342
1342
|
function Tt() {
|
|
1343
1343
|
for (const [r, t] of Object.entries(It))
|
|
@@ -1470,9 +1470,9 @@ function xt(r, t) {
|
|
|
1470
1470
|
applyValue: (l) => u.setData(l),
|
|
1471
1471
|
isEqual: at
|
|
1472
1472
|
}), o = rt(u, "main");
|
|
1473
|
-
const d = (l, f,
|
|
1474
|
-
const
|
|
1475
|
-
t.invokeMethodAsync(
|
|
1473
|
+
const d = (l, f, E) => {
|
|
1474
|
+
const b = E ? "OnEditorFocus" : "OnEditorBlur";
|
|
1475
|
+
t.invokeMethodAsync(b, s);
|
|
1476
1476
|
};
|
|
1477
1477
|
return u.ui.focusTracker.on("change:isFocused", d), t.invokeMethodAsync("OnEditorReady", s), () => {
|
|
1478
1478
|
u.ui.focusTracker.off("change:isFocused", d), a.unmount(), s && (globalThis.DotNet?.disposeJSObjectReference(s), s = null), o = null;
|
|
@@ -1556,7 +1556,7 @@ export {
|
|
|
1556
1556
|
y as CKEditor5ChangeDataEvent,
|
|
1557
1557
|
C as ContextsRegistry,
|
|
1558
1558
|
_ as CustomEditorPluginsRegistry,
|
|
1559
|
-
|
|
1559
|
+
Et as EditableComponentElement,
|
|
1560
1560
|
kt as EditorComponentElement,
|
|
1561
1561
|
m as EditorsRegistry,
|
|
1562
1562
|
At as UIPartComponentElement,
|