ckeditor5-blazor 1.10.0 → 1.10.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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +14 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/interop/create-editor-blazor-interop.ts +3 -3
package/dist/index.mjs
CHANGED
|
@@ -394,8 +394,8 @@ async function J(r) {
|
|
|
394
394
|
throw new k(`Unsupported editor type: ${r}`);
|
|
395
395
|
return i;
|
|
396
396
|
}
|
|
397
|
-
class
|
|
398
|
-
static the = new
|
|
397
|
+
class _ {
|
|
398
|
+
static the = new _();
|
|
399
399
|
/**
|
|
400
400
|
* Map of registered custom plugins.
|
|
401
401
|
*/
|
|
@@ -467,7 +467,7 @@ async function Q(r) {
|
|
|
467
467
|
throw new k(`Plugin "${u}" not found in module "${s}".`);
|
|
468
468
|
return p;
|
|
469
469
|
}
|
|
470
|
-
const n = await
|
|
470
|
+
const n = await _.the.get(a);
|
|
471
471
|
if (n)
|
|
472
472
|
return n;
|
|
473
473
|
const { [a]: o } = t;
|
|
@@ -815,7 +815,7 @@ function tt(r) {
|
|
|
815
815
|
dictionary: t
|
|
816
816
|
}));
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function q() {
|
|
819
819
|
return Array.from(document.querySelectorAll("cke5-editor")).map((r) => r.getAttribute("data-cke-editor-id")).filter((r) => r !== null);
|
|
820
820
|
}
|
|
821
821
|
function et(r) {
|
|
@@ -990,7 +990,7 @@ class kt extends HTMLElement {
|
|
|
990
990
|
* Initializes the editable instance.
|
|
991
991
|
*/
|
|
992
992
|
async initializeEditable() {
|
|
993
|
-
this.hasAttribute("data-cke-editor-id") || this.setAttribute("data-cke-editor-id",
|
|
993
|
+
this.hasAttribute("data-cke-editor-id") || this.setAttribute("data-cke-editor-id", q()[0]);
|
|
994
994
|
const t = this.getAttribute("data-cke-editor-id"), e = this.getAttribute("data-cke-root-name"), i = JSON.parse(this.getAttribute("data-cke-root-attributes") || "{}"), a = this.getAttribute("data-cke-content"), n = Number.parseInt(this.getAttribute("data-cke-save-debounce-ms"), 10);
|
|
995
995
|
if (!t || !e)
|
|
996
996
|
throw new k("Editor ID or Root Name is missing.");
|
|
@@ -1193,7 +1193,7 @@ class Ct extends HTMLElement {
|
|
|
1193
1193
|
licenseKey: p,
|
|
1194
1194
|
watchdogConfig: w,
|
|
1195
1195
|
config: { plugins: y, ...E }
|
|
1196
|
-
} = e, h = await J(l), v = await (i ? C.the.waitFor(i) : null),
|
|
1196
|
+
} = e, h = await J(l), v = await (i ? C.the.waitFor(i) : null), F = async () => {
|
|
1197
1197
|
const { loadedPlugins: g, hasPremium: T } = await Q(y);
|
|
1198
1198
|
g.push(
|
|
1199
1199
|
await vt({
|
|
@@ -1247,7 +1247,7 @@ class Ct extends HTMLElement {
|
|
|
1247
1247
|
}), O(l) && n && gt(P, n), P;
|
|
1248
1248
|
};
|
|
1249
1249
|
if (u && !v) {
|
|
1250
|
-
const g = await bt(
|
|
1250
|
+
const g = await bt(F, w);
|
|
1251
1251
|
return g.on("error", (T, { causesRestart: U }) => {
|
|
1252
1252
|
if (U) {
|
|
1253
1253
|
const A = m.the.getItem(t);
|
|
@@ -1258,7 +1258,7 @@ class Ct extends HTMLElement {
|
|
|
1258
1258
|
m.the.register(t, T);
|
|
1259
1259
|
}), await g.create({}), g.editor;
|
|
1260
1260
|
}
|
|
1261
|
-
return
|
|
1261
|
+
return F();
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
1264
|
function it(r, t) {
|
|
@@ -1290,7 +1290,7 @@ class Ot extends HTMLElement {
|
|
|
1290
1290
|
*/
|
|
1291
1291
|
async connectedCallback() {
|
|
1292
1292
|
await x();
|
|
1293
|
-
const t = this.getAttribute("data-cke-editor-id") ||
|
|
1293
|
+
const t = this.getAttribute("data-cke-editor-id") || q()[0], e = this.getAttribute("data-cke-name");
|
|
1294
1294
|
!t || !e || (this.style.display = "block", this.unmountEffect = m.the.mountEffect(t, (i) => {
|
|
1295
1295
|
if (!this.isConnected)
|
|
1296
1296
|
return;
|
|
@@ -1408,7 +1408,7 @@ function ot(r, t) {
|
|
|
1408
1408
|
};
|
|
1409
1409
|
}
|
|
1410
1410
|
function zt(r, t) {
|
|
1411
|
-
const e = r.getAttribute("data-cke-editor-id") ??
|
|
1411
|
+
const e = r.getAttribute("data-cke-editor-id") ?? q()[0], i = r.getAttribute("data-cke-root-name") ?? "main";
|
|
1412
1412
|
let a = !1, n = null, o = null, c = nt(), u = null;
|
|
1413
1413
|
const s = (d) => {
|
|
1414
1414
|
if (!(d instanceof b) || d.detail.editorId !== e)
|
|
@@ -1489,10 +1489,9 @@ function $t(r, t) {
|
|
|
1489
1489
|
* to avoid unnecessary overhead for consumers that don't use this feature.
|
|
1490
1490
|
*/
|
|
1491
1491
|
attachImageUploadAdapter: async () => {
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
St(s, t);
|
|
1492
|
+
i || m.the.mountEffect(e, (s) => {
|
|
1493
|
+
St(s, t);
|
|
1494
|
+
});
|
|
1496
1495
|
}
|
|
1497
1496
|
};
|
|
1498
1497
|
}
|
|
@@ -1543,7 +1542,7 @@ export {
|
|
|
1543
1542
|
k as CKEditor5BlazorError,
|
|
1544
1543
|
b as CKEditor5ChangeDataEvent,
|
|
1545
1544
|
C as ContextsRegistry,
|
|
1546
|
-
|
|
1545
|
+
_ as CustomEditorPluginsRegistry,
|
|
1547
1546
|
kt as EditableComponentElement,
|
|
1548
1547
|
Ct as EditorComponentElement,
|
|
1549
1548
|
m as EditorsRegistry,
|