ckeditor5-blazor 1.11.0 → 1.12.0
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/editable.d.ts.map +1 -1
- package/dist/elements/editor/editor.d.ts.map +1 -1
- package/dist/elements/editor/utils/assign-editor-roots-to-config.d.ts +17 -0
- package/dist/elements/editor/utils/assign-editor-roots-to-config.d.ts.map +1 -0
- package/dist/elements/editor/utils/index.d.ts +2 -3
- package/dist/elements/editor/utils/index.d.ts.map +1 -1
- package/dist/elements/editor/utils/query-all-editor-editables.d.ts +24 -0
- package/dist/elements/editor/utils/query-all-editor-editables.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +395 -437
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/elements/editable.test.ts +42 -3
- package/src/elements/editable.ts +2 -0
- package/src/elements/editor/editor.test.ts +97 -13
- package/src/elements/editor/editor.ts +39 -64
- package/src/elements/editor/utils/assign-editor-roots-to-config.ts +61 -0
- package/src/elements/editor/utils/get-editor-roots-values.ts +1 -1
- package/src/elements/editor/utils/index.ts +2 -3
- package/src/elements/editor/utils/query-all-editor-editables.ts +81 -0
- package/src/elements/ui-part.test.ts +8 -9
- package/src/interop/create-editable-blazor-interop.test.ts +5 -2
- package/dist/elements/editor/utils/assign-initial-data-to-editor-config.d.ts +0 -10
- package/dist/elements/editor/utils/assign-initial-data-to-editor-config.d.ts.map +0 -1
- package/dist/elements/editor/utils/assign-source-elements-to-editor-config.d.ts +0 -12
- package/dist/elements/editor/utils/assign-source-elements-to-editor-config.d.ts.map +0 -1
- package/dist/elements/editor/utils/query-editor-editables.d.ts +0 -25
- package/dist/elements/editor/utils/query-editor-editables.d.ts.map +0 -1
- package/src/elements/editor/utils/assign-initial-data-to-editor-config.ts +0 -47
- package/src/elements/editor/utils/assign-source-elements-to-editor-config.ts +0 -59
- package/src/elements/editor/utils/query-editor-editables.ts +0 -101
package/dist/index.mjs
CHANGED
|
@@ -3,15 +3,15 @@ class v extends Error {
|
|
|
3
3
|
super(t), this.name = "CKEditor5BlazorError";
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function U(r, t) {
|
|
7
7
|
if (!r || r.size !== t.size)
|
|
8
8
|
return !1;
|
|
9
|
-
for (const [e,
|
|
10
|
-
if (!t.has(e) || t.get(e) !==
|
|
9
|
+
for (const [e, n] of r)
|
|
10
|
+
if (!t.has(e) || t.get(e) !== n)
|
|
11
11
|
return !1;
|
|
12
12
|
return !0;
|
|
13
13
|
}
|
|
14
|
-
class
|
|
14
|
+
class H {
|
|
15
15
|
/**
|
|
16
16
|
* Map of registered items.
|
|
17
17
|
*/
|
|
@@ -46,13 +46,13 @@ class Y {
|
|
|
46
46
|
* @param onError Optional error callback.
|
|
47
47
|
* @returns A promise that resolves with the result of the function.
|
|
48
48
|
*/
|
|
49
|
-
execute(t, e,
|
|
50
|
-
const
|
|
51
|
-
return
|
|
49
|
+
execute(t, e, n) {
|
|
50
|
+
const i = this.items.get(t), a = this.initializationErrors.get(t);
|
|
51
|
+
return a ? (n?.(a), Promise.reject(a)) : i ? Promise.resolve(e(i)) : new Promise((o, s) => {
|
|
52
52
|
const c = this.getPendingCallbacks(t);
|
|
53
53
|
c.success.push(async (u) => {
|
|
54
54
|
o(await e(u));
|
|
55
|
-
}),
|
|
55
|
+
}), n ? c.error.push(n) : c.error.push(s);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -63,19 +63,19 @@ class Y {
|
|
|
63
63
|
* @returns A function that stops observing and immediately runs any pending cleanup.
|
|
64
64
|
*/
|
|
65
65
|
mountEffect(t, e) {
|
|
66
|
-
let
|
|
66
|
+
let n, i, a = !1;
|
|
67
67
|
const o = this.watch((s) => {
|
|
68
68
|
const c = s.get(t);
|
|
69
|
-
if (c !==
|
|
69
|
+
if (c !== i && (n?.(), n = void 0, i = c, !!c))
|
|
70
70
|
try {
|
|
71
71
|
const u = e(c);
|
|
72
|
-
|
|
72
|
+
a ? (u?.(), o()) : n = u;
|
|
73
73
|
} catch (u) {
|
|
74
74
|
throw console.error(u), u;
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
return () => {
|
|
78
|
-
|
|
78
|
+
a = !0, i && (o(), n?.(), n = void 0);
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
@@ -89,8 +89,8 @@ class Y {
|
|
|
89
89
|
if (this.items.has(t))
|
|
90
90
|
throw new Error(`Item with ID "${t}" is already registered.`);
|
|
91
91
|
this.resetErrors(t), this.items.set(t, e);
|
|
92
|
-
const
|
|
93
|
-
|
|
92
|
+
const n = this.pendingCallbacks.get(t);
|
|
93
|
+
n && (n.success.forEach((i) => i(e)), this.pendingCallbacks.delete(t)), this.items.size === 1 && t !== null && this.register(null, e);
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
@@ -102,8 +102,8 @@ class Y {
|
|
|
102
102
|
error(t, e) {
|
|
103
103
|
this.batch(() => {
|
|
104
104
|
this.items.delete(t), this.initializationErrors.set(t, e);
|
|
105
|
-
const
|
|
106
|
-
|
|
105
|
+
const n = this.pendingCallbacks.get(t);
|
|
106
|
+
n && (n.error.forEach((i) => i(e)), this.pendingCallbacks.delete(t)), this.initializationErrors.size === 1 && !this.items.size && this.error(null, e);
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
@@ -159,8 +159,8 @@ class Y {
|
|
|
159
159
|
* @returns A promise that resolves with the item instance.
|
|
160
160
|
*/
|
|
161
161
|
waitFor(t) {
|
|
162
|
-
return new Promise((e,
|
|
163
|
-
this.execute(t, e,
|
|
162
|
+
return new Promise((e, n) => {
|
|
163
|
+
this.execute(t, e, n);
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
/**
|
|
@@ -220,7 +220,7 @@ class Y {
|
|
|
220
220
|
* Immediately dispatches the current state to all watchers if it changed.
|
|
221
221
|
*/
|
|
222
222
|
flushWatchers() {
|
|
223
|
-
|
|
223
|
+
U(this.lastNotifiedItems, this.items) && U(this.lastNotifiedErrors, this.initializationErrors) || (this.lastNotifiedItems = new Map(this.items), this.lastNotifiedErrors = new Map(this.initializationErrors), this.watchers.forEach((t) => t(
|
|
224
224
|
new Map(this.items),
|
|
225
225
|
new Map(this.initializationErrors)
|
|
226
226
|
)));
|
|
@@ -236,54 +236,50 @@ class Y {
|
|
|
236
236
|
return e || (e = { success: [], error: [] }, this.pendingCallbacks.set(t, e)), e;
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function W(r, t) {
|
|
240
240
|
let e = null;
|
|
241
|
-
return (...
|
|
241
|
+
return (...n) => {
|
|
242
242
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
243
|
-
t(...
|
|
243
|
+
t(...n);
|
|
244
244
|
}, r);
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
const e = Object.entries(r).filter(([a, n]) => t(n, a));
|
|
249
|
-
return Object.fromEntries(e);
|
|
250
|
-
}
|
|
251
|
-
function S(r) {
|
|
247
|
+
function P(r) {
|
|
252
248
|
return Object.keys(r).length === 0 && r.constructor === Object;
|
|
253
249
|
}
|
|
254
|
-
function
|
|
255
|
-
const e = Object.entries(r).map(([
|
|
250
|
+
function nt(r, t) {
|
|
251
|
+
const e = Object.entries(r).map(([n, i]) => [n, t(i, n)]);
|
|
256
252
|
return Object.fromEntries(e);
|
|
257
253
|
}
|
|
258
|
-
function
|
|
254
|
+
function at(r, t) {
|
|
259
255
|
if (r === t)
|
|
260
256
|
return !0;
|
|
261
|
-
const e = Object.keys(r),
|
|
262
|
-
if (e.length !==
|
|
257
|
+
const e = Object.keys(r), n = Object.keys(t);
|
|
258
|
+
if (e.length !== n.length)
|
|
263
259
|
return !1;
|
|
264
|
-
for (const
|
|
265
|
-
if (r[
|
|
260
|
+
for (const i of e)
|
|
261
|
+
if (r[i] !== t[i] || !Object.prototype.hasOwnProperty.call(t, i))
|
|
266
262
|
return !1;
|
|
267
263
|
return !0;
|
|
268
264
|
}
|
|
269
|
-
function
|
|
265
|
+
function it() {
|
|
270
266
|
return Math.random().toString(36).substring(2);
|
|
271
267
|
}
|
|
272
|
-
function
|
|
268
|
+
function ot(r, {
|
|
273
269
|
timeOutAfter: t = 500,
|
|
274
270
|
retryAfter: e = 100
|
|
275
271
|
} = {}) {
|
|
276
|
-
return new Promise((
|
|
277
|
-
const
|
|
272
|
+
return new Promise((n, i) => {
|
|
273
|
+
const a = Date.now();
|
|
278
274
|
let o = null;
|
|
279
275
|
const s = setTimeout(() => {
|
|
280
|
-
|
|
276
|
+
i(o ?? new Error("Timeout"));
|
|
281
277
|
}, t), c = async () => {
|
|
282
278
|
try {
|
|
283
279
|
const u = await r();
|
|
284
|
-
clearTimeout(s),
|
|
280
|
+
clearTimeout(s), n(u);
|
|
285
281
|
} catch (u) {
|
|
286
|
-
o = u, Date.now() -
|
|
282
|
+
o = u, Date.now() - a > t ? i(u) : setTimeout(c, e);
|
|
287
283
|
}
|
|
288
284
|
};
|
|
289
285
|
c();
|
|
@@ -310,11 +306,11 @@ function L(r) {
|
|
|
310
306
|
} };
|
|
311
307
|
let t;
|
|
312
308
|
return {
|
|
313
|
-
promise: new Promise((
|
|
314
|
-
t = new MutationObserver((
|
|
315
|
-
for (const
|
|
316
|
-
if (
|
|
317
|
-
t.disconnect(),
|
|
309
|
+
promise: new Promise((n) => {
|
|
310
|
+
t = new MutationObserver((i) => {
|
|
311
|
+
for (const a of i)
|
|
312
|
+
if (a.type === "attributes" && a.attributeName === "data-cke-interactive" && r.hasAttribute("data-cke-interactive")) {
|
|
313
|
+
t.disconnect(), n();
|
|
318
314
|
break;
|
|
319
315
|
}
|
|
320
316
|
}), t.observe(r, { attributes: !0 });
|
|
@@ -325,73 +321,50 @@ function L(r) {
|
|
|
325
321
|
function x(r) {
|
|
326
322
|
r.setAttribute("data-cke-interactive", "true");
|
|
327
323
|
}
|
|
328
|
-
function
|
|
329
|
-
const
|
|
330
|
-
...Object.keys(
|
|
331
|
-
...Object.keys(t.roots ?? {})
|
|
332
|
-
]), n = Array.from(a).reduce((o, s) => ({
|
|
333
|
-
...o,
|
|
334
|
-
[s]: {
|
|
335
|
-
...t.roots?.[s],
|
|
336
|
-
...s === "main" ? t.root : {},
|
|
337
|
-
/* v8 ignore next 5 */
|
|
338
|
-
...s in e ? {
|
|
339
|
-
initialData: e[s]
|
|
340
|
-
} : {}
|
|
341
|
-
}
|
|
342
|
-
}), Object.create(t.roots || {})), i = {
|
|
343
|
-
...t,
|
|
344
|
-
roots: n
|
|
345
|
-
};
|
|
346
|
-
return delete i.root, i;
|
|
347
|
-
}
|
|
348
|
-
function mt(r) {
|
|
349
|
-
return typeof r == "string" ? { main: r } : { ...r };
|
|
350
|
-
}
|
|
351
|
-
function ht(r, t, e) {
|
|
352
|
-
const a = ft(t);
|
|
353
|
-
if (!r.editorName || r.editorName === "ClassicEditor")
|
|
354
|
-
return {
|
|
355
|
-
...e,
|
|
356
|
-
attachTo: a.main
|
|
357
|
-
};
|
|
358
|
-
const n = /* @__PURE__ */ new Set([
|
|
359
|
-
...Object.keys(a),
|
|
324
|
+
function st(r, t, e) {
|
|
325
|
+
const n = !r.editorName || r.editorName === "ClassicEditor", i = /* @__PURE__ */ new Set([
|
|
326
|
+
...Object.keys(t),
|
|
360
327
|
...Object.keys(e.roots ?? {})
|
|
361
|
-
]),
|
|
328
|
+
]), a = Array.from(i).reduce((s, c) => ({
|
|
362
329
|
...s,
|
|
363
330
|
[c]: {
|
|
364
|
-
/* v8 ignore next */
|
|
331
|
+
/* v8 ignore next 1 */
|
|
365
332
|
...e.roots?.[c],
|
|
366
333
|
...c === "main" ? e.root : {},
|
|
367
|
-
/* v8 ignore next
|
|
368
|
-
...c in
|
|
369
|
-
|
|
334
|
+
/* v8 ignore next 12 */
|
|
335
|
+
...c in t ? {
|
|
336
|
+
...t[c].content !== null && {
|
|
337
|
+
initialData: t[c].content
|
|
338
|
+
},
|
|
339
|
+
modelElement: t[c].modelElement || "$root",
|
|
340
|
+
...!n && t[c].element !== null && {
|
|
341
|
+
element: t[c].element
|
|
342
|
+
}
|
|
370
343
|
} : {}
|
|
371
344
|
}
|
|
372
|
-
}),
|
|
345
|
+
}), { ...e.roots || {} }), o = {
|
|
373
346
|
...e,
|
|
374
|
-
roots:
|
|
347
|
+
roots: a,
|
|
348
|
+
...n && t.main?.element && {
|
|
349
|
+
attachTo: t.main.element
|
|
350
|
+
}
|
|
375
351
|
};
|
|
376
352
|
return delete o.root, o;
|
|
377
353
|
}
|
|
378
|
-
function
|
|
379
|
-
return r instanceof HTMLElement ? { main: r } : { ...r };
|
|
380
|
-
}
|
|
381
|
-
function pt(r) {
|
|
354
|
+
function ct(r) {
|
|
382
355
|
const t = [
|
|
383
356
|
r.ui?.element,
|
|
384
357
|
r.ui?.view?.toolbar?.element,
|
|
385
358
|
r.ui?.view?.menuBarView?.element
|
|
386
359
|
].filter(Boolean);
|
|
387
|
-
for (const
|
|
388
|
-
|
|
360
|
+
for (const a of t)
|
|
361
|
+
i(a);
|
|
389
362
|
const e = r.ui?.view?.body?._bodyCollectionContainer;
|
|
390
|
-
e?.isConnected &&
|
|
391
|
-
const
|
|
392
|
-
if (
|
|
393
|
-
for (const
|
|
394
|
-
|
|
363
|
+
e?.isConnected && i(e);
|
|
364
|
+
const n = r.editing?.view;
|
|
365
|
+
if (n)
|
|
366
|
+
for (const a of n.domRoots.values())
|
|
367
|
+
a instanceof HTMLElement && (a.removeAttribute("contenteditable"), a.removeAttribute("role"), a.removeAttribute("aria-label"), a.removeAttribute("aria-multiline"), a.removeAttribute("spellcheck"), a.classList.remove(
|
|
395
368
|
"ck",
|
|
396
369
|
"ck-content",
|
|
397
370
|
"ck-editor__editable",
|
|
@@ -399,55 +372,55 @@ function pt(r) {
|
|
|
399
372
|
"ck-editor__editable_inline",
|
|
400
373
|
"ck-blurred",
|
|
401
374
|
"ck-focused"
|
|
402
|
-
),
|
|
403
|
-
function
|
|
404
|
-
|
|
375
|
+
), i(a));
|
|
376
|
+
function i(a) {
|
|
377
|
+
a.hasAttribute("data-cke-controlled") ? a.innerHTML = "" : a.remove();
|
|
405
378
|
}
|
|
406
379
|
}
|
|
407
|
-
const
|
|
408
|
-
async function
|
|
409
|
-
const
|
|
380
|
+
const z = /* @__PURE__ */ Symbol.for("context-editor-watchdog");
|
|
381
|
+
async function ut({ context: r, creator: t, config: e }) {
|
|
382
|
+
const n = it();
|
|
410
383
|
await r.add({
|
|
411
384
|
creator: t.create.bind(t),
|
|
412
|
-
id:
|
|
385
|
+
id: n,
|
|
413
386
|
type: "editor",
|
|
414
387
|
config: e
|
|
415
388
|
});
|
|
416
|
-
const
|
|
389
|
+
const i = r.getItem(n), a = {
|
|
417
390
|
state: "available",
|
|
418
|
-
editorContextId:
|
|
391
|
+
editorContextId: n,
|
|
419
392
|
context: r
|
|
420
393
|
};
|
|
421
|
-
|
|
394
|
+
i[z] = a;
|
|
422
395
|
const o = r.destroy.bind(r);
|
|
423
|
-
return r.destroy = async () => (
|
|
424
|
-
...
|
|
425
|
-
editor:
|
|
396
|
+
return r.destroy = async () => (a.state = "unavailable", o()), {
|
|
397
|
+
...a,
|
|
398
|
+
editor: i
|
|
426
399
|
};
|
|
427
400
|
}
|
|
428
|
-
function
|
|
429
|
-
return
|
|
401
|
+
function lt(r) {
|
|
402
|
+
return z in r ? r[z] : null;
|
|
430
403
|
}
|
|
431
|
-
function
|
|
432
|
-
return Array.from(r.model.document.getRoots()).reduce((t, e) => (e.rootName === "$graveyard" || (t[e.rootName] = r.getData({ rootName: e.rootName })), t), /* @__PURE__ */ Object.create(
|
|
404
|
+
function J(r) {
|
|
405
|
+
return Array.from(r.model.document.getRoots()).reduce((t, e) => (e.rootName === "$graveyard" || (t[e.rootName] = r.getData({ rootName: e.rootName })), t), /* @__PURE__ */ Object.create(null));
|
|
433
406
|
}
|
|
434
|
-
function
|
|
407
|
+
function V(r) {
|
|
435
408
|
return ["inline", "classic", "balloon", "decoupled"].includes(r);
|
|
436
409
|
}
|
|
437
|
-
async function
|
|
438
|
-
const t = await import("ckeditor5"),
|
|
410
|
+
async function j(r) {
|
|
411
|
+
const t = await import("ckeditor5"), n = {
|
|
439
412
|
inline: t.InlineEditor,
|
|
440
413
|
balloon: t.BalloonEditor,
|
|
441
414
|
classic: t.ClassicEditor,
|
|
442
415
|
decoupled: t.DecoupledEditor,
|
|
443
416
|
multiroot: t.MultiRootEditor
|
|
444
417
|
}[r];
|
|
445
|
-
if (!
|
|
418
|
+
if (!n)
|
|
446
419
|
throw new v(`Unsupported editor type: ${r}`);
|
|
447
|
-
return
|
|
420
|
+
return n;
|
|
448
421
|
}
|
|
449
|
-
class
|
|
450
|
-
static the = new
|
|
422
|
+
class _ {
|
|
423
|
+
static the = new _();
|
|
451
424
|
/**
|
|
452
425
|
* Map of registered custom plugins.
|
|
453
426
|
*/
|
|
@@ -506,63 +479,63 @@ class j {
|
|
|
506
479
|
return this.plugins.has(t);
|
|
507
480
|
}
|
|
508
481
|
}
|
|
509
|
-
async function
|
|
482
|
+
async function G(r) {
|
|
510
483
|
const t = await import("ckeditor5");
|
|
511
484
|
let e = null;
|
|
512
|
-
const
|
|
513
|
-
if (
|
|
514
|
-
const { name: c, path: u } =
|
|
485
|
+
const n = r.map(async (i) => {
|
|
486
|
+
if (dt(i)) {
|
|
487
|
+
const { name: c, path: u } = i.$import, l = await import(
|
|
515
488
|
/* @vite-ignore */
|
|
516
489
|
u
|
|
517
|
-
), f = (Object.prototype.hasOwnProperty.call(
|
|
490
|
+
), f = (Object.prototype.hasOwnProperty.call(l, c) ? l[c] : void 0) ?? (Object.prototype.hasOwnProperty.call(l, "default") ? l.default : void 0);
|
|
518
491
|
if (!f)
|
|
519
492
|
throw new v(`Plugin "${c}" not found in module "${u}".`);
|
|
520
493
|
return f;
|
|
521
494
|
}
|
|
522
|
-
const
|
|
523
|
-
if (
|
|
524
|
-
return
|
|
525
|
-
const { [
|
|
495
|
+
const a = await _.the.get(i);
|
|
496
|
+
if (a)
|
|
497
|
+
return a;
|
|
498
|
+
const { [i]: o } = t;
|
|
526
499
|
if (o)
|
|
527
500
|
return o;
|
|
528
501
|
if (!e)
|
|
529
502
|
try {
|
|
530
503
|
e = await import("ckeditor5-premium-features");
|
|
531
504
|
} catch (c) {
|
|
532
|
-
throw console.error(`Failed to load premium package: ${c}`), new v(`Plugin "${
|
|
505
|
+
throw console.error(`Failed to load premium package: ${c}`), new v(`Plugin "${i}" not found in base package and failed to load premium package.`);
|
|
533
506
|
}
|
|
534
|
-
const { [
|
|
507
|
+
const { [i]: s } = e || {};
|
|
535
508
|
if (s)
|
|
536
509
|
return s;
|
|
537
|
-
throw new v(`Plugin "${
|
|
510
|
+
throw new v(`Plugin "${i}" not found in base or premium packages.`);
|
|
538
511
|
});
|
|
539
512
|
return {
|
|
540
|
-
loadedPlugins: await Promise.all(
|
|
513
|
+
loadedPlugins: await Promise.all(n),
|
|
541
514
|
hasPremium: !!e
|
|
542
515
|
};
|
|
543
516
|
}
|
|
544
|
-
function
|
|
517
|
+
function dt(r) {
|
|
545
518
|
return typeof r == "object" && r !== null && "$import" in r;
|
|
546
519
|
}
|
|
547
|
-
async function
|
|
520
|
+
async function Y(r, t) {
|
|
548
521
|
const e = [r.ui, r.content];
|
|
549
522
|
return await Promise.all(
|
|
550
523
|
[
|
|
551
|
-
|
|
524
|
+
B("ckeditor5", e),
|
|
552
525
|
/* v8 ignore next -- @preserve */
|
|
553
|
-
t &&
|
|
554
|
-
].filter((
|
|
555
|
-
).then((
|
|
526
|
+
t && B("ckeditor5-premium-features", e)
|
|
527
|
+
].filter((i) => !!i)
|
|
528
|
+
).then((i) => i.flat());
|
|
556
529
|
}
|
|
557
|
-
async function
|
|
530
|
+
async function B(r, t) {
|
|
558
531
|
return await Promise.all(
|
|
559
532
|
t.filter((e) => e !== "en").map(async (e) => {
|
|
560
|
-
const
|
|
561
|
-
return
|
|
533
|
+
const n = await mt(r, e);
|
|
534
|
+
return n?.default ?? n;
|
|
562
535
|
}).filter(Boolean)
|
|
563
536
|
);
|
|
564
537
|
}
|
|
565
|
-
async function
|
|
538
|
+
async function mt(r, t) {
|
|
566
539
|
try {
|
|
567
540
|
if (r === "ckeditor5")
|
|
568
541
|
switch (t) {
|
|
@@ -862,12 +835,12 @@ async function yt(r, t) {
|
|
|
862
835
|
return console.error(`Failed to load translation for ${r}/${t}:`, e), null;
|
|
863
836
|
}
|
|
864
837
|
}
|
|
865
|
-
function
|
|
866
|
-
return
|
|
838
|
+
function X(r) {
|
|
839
|
+
return nt(r, (t) => ({
|
|
867
840
|
dictionary: t
|
|
868
841
|
}));
|
|
869
842
|
}
|
|
870
|
-
function
|
|
843
|
+
function Q(r) {
|
|
871
844
|
return r ? typeof r == "string" ? {
|
|
872
845
|
ui: r,
|
|
873
846
|
content: r
|
|
@@ -876,103 +849,99 @@ function tt(r) {
|
|
|
876
849
|
content: "en"
|
|
877
850
|
};
|
|
878
851
|
}
|
|
879
|
-
function
|
|
880
|
-
return Array.from(document.querySelectorAll("cke5-editor")).map((r) => r.getAttribute("data-cke-editor-id")).filter((r) => r !== null);
|
|
881
|
-
}
|
|
882
|
-
function et(r) {
|
|
883
|
-
const t = rt(r);
|
|
884
|
-
return W(t, ({ element: e }) => e);
|
|
885
|
-
}
|
|
886
|
-
function G(r) {
|
|
887
|
-
const t = rt(r), e = W(t, ({ content: a }) => a);
|
|
888
|
-
return st(e, (a) => typeof a == "string");
|
|
889
|
-
}
|
|
890
|
-
function rt(r) {
|
|
852
|
+
function Z(r) {
|
|
891
853
|
const t = Array.from(document.querySelectorAll(`cke5-editable[data-cke-editor-id="${r}"]`)).reduce((o, s) => {
|
|
892
|
-
const c = s.getAttribute("data-cke-root-name"), u = s.getAttribute("data-cke-
|
|
854
|
+
const c = s.getAttribute("data-cke-root-name"), u = s.getAttribute("data-cke-root-model-element-name") || null;
|
|
893
855
|
return o[c] = {
|
|
894
856
|
element: s.querySelector("[data-cke-editable-content]"),
|
|
895
|
-
content:
|
|
857
|
+
content: s.getAttribute("data-cke-content"),
|
|
858
|
+
modelElement: u
|
|
896
859
|
}, o;
|
|
897
|
-
}, /* @__PURE__ */ Object.create(
|
|
860
|
+
}, /* @__PURE__ */ Object.create(null)), e = document.querySelector(`cke5-editor[data-cke-editor-id="${r}"]`);
|
|
898
861
|
if (!e)
|
|
899
862
|
return t;
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
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
|
+
i && !t.main && (t.main = {
|
|
865
|
+
element: i,
|
|
866
|
+
content: n.main || "",
|
|
867
|
+
modelElement: a
|
|
868
|
+
});
|
|
869
|
+
for (const [o, s] of Object.entries(n))
|
|
870
|
+
t[o] ? t[o] = {
|
|
871
|
+
...t[o],
|
|
872
|
+
content: t[o].content ?? s,
|
|
873
|
+
modelElement: t[o].modelElement ?? a
|
|
874
|
+
} : t[o] = {
|
|
875
|
+
element: null,
|
|
876
|
+
content: s,
|
|
877
|
+
modelElement: a
|
|
878
|
+
};
|
|
879
|
+
return t;
|
|
880
|
+
}
|
|
881
|
+
function F() {
|
|
882
|
+
return Array.from(document.querySelectorAll("cke5-editor")).map((r) => r.getAttribute("data-cke-editor-id")).filter((r) => r !== null);
|
|
914
883
|
}
|
|
915
884
|
function M(r) {
|
|
916
885
|
if (!r || typeof r != "object")
|
|
917
886
|
return r;
|
|
918
887
|
if (Array.isArray(r))
|
|
919
|
-
return r.map((
|
|
888
|
+
return r.map((n) => M(n));
|
|
920
889
|
const t = r;
|
|
921
890
|
if (t.$element && typeof t.$element == "string") {
|
|
922
|
-
const
|
|
923
|
-
return
|
|
891
|
+
const n = document.querySelector(t.$element);
|
|
892
|
+
return n || console.warn(`Element not found for selector: ${t.$element}`), n || null;
|
|
924
893
|
}
|
|
925
894
|
const e = /* @__PURE__ */ Object.create(null);
|
|
926
|
-
for (const [
|
|
927
|
-
e[
|
|
895
|
+
for (const [n, i] of Object.entries(r))
|
|
896
|
+
e[n] = M(i);
|
|
928
897
|
return e;
|
|
929
898
|
}
|
|
930
|
-
function
|
|
899
|
+
function S(r, t, e) {
|
|
931
900
|
if (!e || typeof e != "object")
|
|
932
901
|
return e;
|
|
933
902
|
if (Array.isArray(e))
|
|
934
|
-
return e.map((
|
|
935
|
-
const
|
|
936
|
-
if (
|
|
937
|
-
const
|
|
938
|
-
return o === void 0 && console.warn(`Translation not found for key: ${
|
|
903
|
+
return e.map((a) => S(r, t, a));
|
|
904
|
+
const n = e;
|
|
905
|
+
if (n.$translation && typeof n.$translation == "string") {
|
|
906
|
+
const a = n.$translation, o = ht(r, a, t);
|
|
907
|
+
return o === void 0 && console.warn(`Translation not found for key: ${a}`), o !== void 0 ? o : null;
|
|
939
908
|
}
|
|
940
|
-
const
|
|
941
|
-
for (const [
|
|
942
|
-
|
|
943
|
-
return
|
|
909
|
+
const i = /* @__PURE__ */ Object.create(null);
|
|
910
|
+
for (const [a, o] of Object.entries(e))
|
|
911
|
+
i[a] = S(r, t, o);
|
|
912
|
+
return i;
|
|
944
913
|
}
|
|
945
|
-
function
|
|
946
|
-
for (const
|
|
947
|
-
const
|
|
948
|
-
if (
|
|
949
|
-
return
|
|
914
|
+
function ht(r, t, e) {
|
|
915
|
+
for (const n of r) {
|
|
916
|
+
const i = n[e];
|
|
917
|
+
if (i?.dictionary && t in i.dictionary)
|
|
918
|
+
return i.dictionary[t];
|
|
950
919
|
}
|
|
951
920
|
}
|
|
952
|
-
function
|
|
921
|
+
function ft(r, t) {
|
|
953
922
|
const { editing: e } = r;
|
|
954
|
-
e.view.change((
|
|
955
|
-
|
|
923
|
+
e.view.change((n) => {
|
|
924
|
+
n.setStyle("height", `${t}px`, e.view.document.getRoot());
|
|
956
925
|
});
|
|
957
926
|
}
|
|
958
|
-
const
|
|
959
|
-
async function
|
|
960
|
-
const { EditorWatchdog: e } = await import("ckeditor5"),
|
|
927
|
+
const $ = /* @__PURE__ */ Symbol.for("elixir-editor-watchdog");
|
|
928
|
+
async function pt(r, t) {
|
|
929
|
+
const { EditorWatchdog: e } = await import("ckeditor5"), n = new e(null, t ?? {
|
|
961
930
|
crashNumberLimit: 10,
|
|
962
931
|
minimumNonErrorTimePeriod: 5e3
|
|
963
932
|
});
|
|
964
|
-
return
|
|
965
|
-
const
|
|
966
|
-
return
|
|
967
|
-
}),
|
|
933
|
+
return n.setCreator(async () => {
|
|
934
|
+
const i = await r();
|
|
935
|
+
return i[$] = n, i;
|
|
936
|
+
}), n;
|
|
968
937
|
}
|
|
969
|
-
function
|
|
970
|
-
return
|
|
938
|
+
function wt(r) {
|
|
939
|
+
return $ in r ? r[$] : null;
|
|
971
940
|
}
|
|
972
|
-
class
|
|
973
|
-
static the = new
|
|
941
|
+
class C extends H {
|
|
942
|
+
static the = new C();
|
|
974
943
|
}
|
|
975
|
-
class
|
|
944
|
+
class gt extends HTMLElement {
|
|
976
945
|
/**
|
|
977
946
|
* The promise that resolves to the context instance.
|
|
978
947
|
*/
|
|
@@ -991,29 +960,29 @@ class Ct extends HTMLElement {
|
|
|
991
960
|
* Initializes the context component.
|
|
992
961
|
*/
|
|
993
962
|
async initializeContext() {
|
|
994
|
-
const t = JSON.parse(this.getAttribute("data-cke-context")), { customTranslations: e, watchdogConfig:
|
|
995
|
-
...await
|
|
996
|
-
|
|
997
|
-
].filter((b) => !
|
|
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
|
+
...await Y(s, u),
|
|
965
|
+
X(e || {})
|
|
966
|
+
].filter((b) => !P(b));
|
|
998
967
|
this.contextPromise = (async () => {
|
|
999
|
-
const { ContextWatchdog: b, Context:
|
|
968
|
+
const { ContextWatchdog: b, Context: E } = await import("ckeditor5"), w = new b(E, {
|
|
1000
969
|
crashNumberLimit: 10,
|
|
1001
|
-
...
|
|
970
|
+
...n
|
|
1002
971
|
});
|
|
1003
|
-
let
|
|
1004
|
-
return
|
|
1005
|
-
...
|
|
972
|
+
let g = M(a);
|
|
973
|
+
return g = S([...l].reverse(), s.ui, g), await w.create({
|
|
974
|
+
...g,
|
|
1006
975
|
language: s,
|
|
1007
976
|
plugins: c,
|
|
1008
|
-
...
|
|
1009
|
-
translations:
|
|
977
|
+
...l.length && {
|
|
978
|
+
translations: l
|
|
1010
979
|
}
|
|
1011
|
-
}), w.on("itemError", (...
|
|
1012
|
-
console.error("Context item error:", ...
|
|
980
|
+
}), w.on("itemError", (...h) => {
|
|
981
|
+
console.error("Context item error:", ...h);
|
|
1013
982
|
}), w;
|
|
1014
983
|
})();
|
|
1015
984
|
const f = await this.contextPromise;
|
|
1016
|
-
this.isConnected &&
|
|
985
|
+
this.isConnected && C.the.register(o, f);
|
|
1017
986
|
}
|
|
1018
987
|
/**
|
|
1019
988
|
* Destroys the context component. Unmounts root from the editor.
|
|
@@ -1025,14 +994,14 @@ class Ct extends HTMLElement {
|
|
|
1025
994
|
try {
|
|
1026
995
|
await (await this.contextPromise)?.destroy();
|
|
1027
996
|
} finally {
|
|
1028
|
-
this.contextPromise = null, t &&
|
|
997
|
+
this.contextPromise = null, t && C.the.hasItem(t) && C.the.unregister(t);
|
|
1029
998
|
}
|
|
1030
999
|
}
|
|
1031
1000
|
}
|
|
1032
|
-
class m extends
|
|
1001
|
+
class m extends H {
|
|
1033
1002
|
static the = new m();
|
|
1034
1003
|
}
|
|
1035
|
-
class
|
|
1004
|
+
class bt extends HTMLElement {
|
|
1036
1005
|
/**
|
|
1037
1006
|
* Stops observing the editor registry and immediately runs any pending cleanup.
|
|
1038
1007
|
*/
|
|
@@ -1051,55 +1020,56 @@ class Ot extends HTMLElement {
|
|
|
1051
1020
|
* Initializes the editable instance.
|
|
1052
1021
|
*/
|
|
1053
1022
|
async initializeEditable() {
|
|
1054
|
-
this.hasAttribute("data-cke-editor-id") || this.setAttribute("data-cke-editor-id",
|
|
1055
|
-
const t = this.getAttribute("data-cke-editor-id"), e = this.getAttribute("data-cke-root-name"),
|
|
1023
|
+
this.hasAttribute("data-cke-editor-id") || this.setAttribute("data-cke-editor-id", F()[0]);
|
|
1024
|
+
const t = this.getAttribute("data-cke-editor-id"), e = this.getAttribute("data-cke-root-name"), n = JSON.parse(this.getAttribute("data-cke-root-attributes") || "{}"), i = this.getAttribute("data-cke-root-model-element-name") || "$root", a = this.getAttribute("data-cke-content"), o = Number.parseInt(this.getAttribute("data-cke-save-debounce-ms"), 10);
|
|
1056
1025
|
if (!t || !e)
|
|
1057
1026
|
throw new v("Editor ID or Root Name is missing.");
|
|
1058
|
-
this.style.display = "block", this.unmountEffect = m.the.mountEffect(t, (
|
|
1027
|
+
this.style.display = "block", this.unmountEffect = m.the.mountEffect(t, (s) => {
|
|
1059
1028
|
if (!this.isConnected)
|
|
1060
1029
|
return;
|
|
1061
|
-
const { ui:
|
|
1062
|
-
if (
|
|
1063
|
-
if (
|
|
1064
|
-
const h =
|
|
1065
|
-
h && h !==
|
|
1066
|
-
[e]:
|
|
1030
|
+
const { ui: c, editing: u, model: d } = s, l = this.querySelector("input"), f = d.document.getRoot(e);
|
|
1031
|
+
if (f?.isAttached()) {
|
|
1032
|
+
if (a !== null) {
|
|
1033
|
+
const h = s.getData({ rootName: e });
|
|
1034
|
+
h && h !== a && s.setData({
|
|
1035
|
+
[e]: a
|
|
1067
1036
|
});
|
|
1068
1037
|
}
|
|
1069
|
-
|
|
1070
|
-
h.setAttributes(
|
|
1038
|
+
P(n) || s.model.change((h) => {
|
|
1039
|
+
h.setAttributes(n, f);
|
|
1071
1040
|
});
|
|
1072
1041
|
return;
|
|
1073
1042
|
}
|
|
1074
|
-
|
|
1043
|
+
s.addRoot(e, {
|
|
1075
1044
|
isUndoable: !1,
|
|
1076
|
-
modelAttributes: { ...
|
|
1077
|
-
|
|
1078
|
-
|
|
1045
|
+
modelAttributes: { ...n },
|
|
1046
|
+
modelElement: i,
|
|
1047
|
+
...a !== null && {
|
|
1048
|
+
initialData: a
|
|
1079
1049
|
}
|
|
1080
1050
|
});
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
const
|
|
1084
|
-
if (!
|
|
1051
|
+
const b = this.querySelector("[data-cke-editable-content]"), E = c.view.createEditable(e, b);
|
|
1052
|
+
c.addEditable(E), u.view.forceRender();
|
|
1053
|
+
const w = () => {
|
|
1054
|
+
if (!d.document.getRoot(e)?.isAttached())
|
|
1085
1055
|
return;
|
|
1086
|
-
const h =
|
|
1056
|
+
const h = s.getData({ rootName: e });
|
|
1087
1057
|
l && (l.value = h, l.dispatchEvent(new Event("input"))), this.dispatchEvent(new CustomEvent("change", {
|
|
1088
1058
|
detail: {
|
|
1089
1059
|
value: h
|
|
1090
1060
|
}
|
|
1091
1061
|
}));
|
|
1092
|
-
},
|
|
1093
|
-
return
|
|
1094
|
-
if (
|
|
1095
|
-
const h =
|
|
1096
|
-
if (h && "detachEditable" in
|
|
1062
|
+
}, g = W(o, w);
|
|
1063
|
+
return s.model.document.on("change:data", g), w(), () => {
|
|
1064
|
+
if (s.model.document.off("change:data", g), s.state !== "destroyed" && e) {
|
|
1065
|
+
const h = s.model.document.getRoot(e);
|
|
1066
|
+
if (h && "detachEditable" in s) {
|
|
1097
1067
|
try {
|
|
1098
|
-
|
|
1099
|
-
} catch (
|
|
1100
|
-
console.error("Unable unmount editable from root:",
|
|
1068
|
+
s.ui.view.editables[e] && s.detachEditable(h);
|
|
1069
|
+
} catch (p) {
|
|
1070
|
+
console.error("Unable unmount editable from root:", p);
|
|
1101
1071
|
}
|
|
1102
|
-
h.isAttached() &&
|
|
1072
|
+
h.isAttached() && s.detachRoot(e, !1);
|
|
1103
1073
|
}
|
|
1104
1074
|
}
|
|
1105
1075
|
};
|
|
@@ -1112,13 +1082,13 @@ class Ot extends HTMLElement {
|
|
|
1112
1082
|
this.interactiveWait?.disconnect(), this.style.display = "none", this.unmountEffect?.(), this.unmountEffect = null;
|
|
1113
1083
|
}
|
|
1114
1084
|
}
|
|
1115
|
-
async function
|
|
1085
|
+
async function Et({
|
|
1116
1086
|
saveDebounceMs: r,
|
|
1117
1087
|
editorId: t,
|
|
1118
1088
|
targetElement: e
|
|
1119
1089
|
}) {
|
|
1120
|
-
const { Plugin:
|
|
1121
|
-
return class extends
|
|
1090
|
+
const { Plugin: n } = await import("ckeditor5");
|
|
1091
|
+
return class extends n {
|
|
1122
1092
|
/**
|
|
1123
1093
|
* The name of the plugin.
|
|
1124
1094
|
*/
|
|
@@ -1129,34 +1099,34 @@ async function It({
|
|
|
1129
1099
|
* Initializes the plugin.
|
|
1130
1100
|
*/
|
|
1131
1101
|
afterInit() {
|
|
1132
|
-
const { editor:
|
|
1133
|
-
|
|
1102
|
+
const { editor: a } = this, o = W(r, this.dispatch);
|
|
1103
|
+
a.model.document.on("change:data", o), a.once("ready", this.dispatch);
|
|
1134
1104
|
}
|
|
1135
1105
|
/**
|
|
1136
1106
|
* Dispatches a custom event with all roots data.
|
|
1137
1107
|
*/
|
|
1138
1108
|
dispatch = () => {
|
|
1139
|
-
const { editor:
|
|
1109
|
+
const { editor: a } = this;
|
|
1140
1110
|
e.dispatchEvent(
|
|
1141
|
-
new
|
|
1111
|
+
new y({
|
|
1142
1112
|
editorId: t,
|
|
1143
|
-
editor:
|
|
1144
|
-
roots:
|
|
1113
|
+
editor: a,
|
|
1114
|
+
roots: J(a)
|
|
1145
1115
|
})
|
|
1146
1116
|
);
|
|
1147
1117
|
};
|
|
1148
1118
|
};
|
|
1149
1119
|
}
|
|
1150
|
-
class
|
|
1120
|
+
class y extends CustomEvent {
|
|
1151
1121
|
static EVENT_NAME = "ckeditor5:change:data";
|
|
1152
1122
|
constructor(t) {
|
|
1153
|
-
super(
|
|
1123
|
+
super(y.EVENT_NAME, {
|
|
1154
1124
|
detail: t,
|
|
1155
1125
|
bubbles: !0
|
|
1156
1126
|
});
|
|
1157
1127
|
}
|
|
1158
1128
|
}
|
|
1159
|
-
async function
|
|
1129
|
+
async function yt(r) {
|
|
1160
1130
|
const { Plugin: t } = await import("ckeditor5");
|
|
1161
1131
|
return class extends t {
|
|
1162
1132
|
/**
|
|
@@ -1177,16 +1147,16 @@ async function Tt(r) {
|
|
|
1177
1147
|
* Initializes the plugin.
|
|
1178
1148
|
*/
|
|
1179
1149
|
afterInit() {
|
|
1180
|
-
const { editor:
|
|
1181
|
-
this.input = document.getElementById(`${
|
|
1150
|
+
const { editor: n } = this, a = n.sourceElement.id.replace(/_editor$/, "");
|
|
1151
|
+
this.input = document.getElementById(`${a}_input`), this.input && (n.model.document.on("change:data", W(r, () => this.sync())), n.once("ready", this.sync), this.form = this.input.closest("form"), this.form?.addEventListener("submit", this.sync));
|
|
1182
1152
|
}
|
|
1183
1153
|
/**
|
|
1184
1154
|
* Synchronizes the editor's content with the input field.
|
|
1185
1155
|
*/
|
|
1186
1156
|
sync = () => {
|
|
1187
1157
|
if (this.input) {
|
|
1188
|
-
const
|
|
1189
|
-
this.input.value =
|
|
1158
|
+
const n = this.editor.getData();
|
|
1159
|
+
this.input.value = n, this.input.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
1190
1160
|
}
|
|
1191
1161
|
};
|
|
1192
1162
|
/**
|
|
@@ -1197,7 +1167,7 @@ async function Tt(r) {
|
|
|
1197
1167
|
}
|
|
1198
1168
|
};
|
|
1199
1169
|
}
|
|
1200
|
-
class
|
|
1170
|
+
class kt extends HTMLElement {
|
|
1201
1171
|
/**
|
|
1202
1172
|
* Stops observing the editor registry and immediately runs any pending cleanup.
|
|
1203
1173
|
*/
|
|
@@ -1210,7 +1180,7 @@ class Nt extends HTMLElement {
|
|
|
1210
1180
|
* Mounts the editor component.
|
|
1211
1181
|
*/
|
|
1212
1182
|
async connectedCallback() {
|
|
1213
|
-
await R(), this.interactiveWait = L(this),
|
|
1183
|
+
await R(), this.interactiveWait = L(this), j("classic"), await this.interactiveWait.promise, await this.initializeEditor();
|
|
1214
1184
|
}
|
|
1215
1185
|
/**
|
|
1216
1186
|
* Initializes the editor instance.
|
|
@@ -1220,15 +1190,15 @@ class Nt extends HTMLElement {
|
|
|
1220
1190
|
m.the.resetErrors(t);
|
|
1221
1191
|
try {
|
|
1222
1192
|
this.style.display = "block";
|
|
1223
|
-
const e = await this.createEditor(),
|
|
1193
|
+
const e = await this.createEditor(), n = lt(e), i = wt(e);
|
|
1224
1194
|
if (this.isConnected) {
|
|
1225
|
-
const
|
|
1195
|
+
const a = m.the.mountEffect(t, (o) => {
|
|
1226
1196
|
o.once("destroy", () => {
|
|
1227
1197
|
m.the.unregister(t, !1);
|
|
1228
1198
|
}, { priority: "highest" });
|
|
1229
1199
|
});
|
|
1230
1200
|
this.unmountEffect = async () => {
|
|
1231
|
-
m.the.unregister(t),
|
|
1201
|
+
m.the.unregister(t), a(), n ? n.state !== "unavailable" && await n.context.remove(n.editorContextId) : i ? await i.destroy() : await e.destroy();
|
|
1232
1202
|
}, m.the.register(t, e);
|
|
1233
1203
|
}
|
|
1234
1204
|
} catch (e) {
|
|
@@ -1248,94 +1218,82 @@ class Nt extends HTMLElement {
|
|
|
1248
1218
|
async createEditor() {
|
|
1249
1219
|
const t = JSON.parse(this.getAttribute("data-cke-preset")), {
|
|
1250
1220
|
customTranslations: e,
|
|
1251
|
-
editorType:
|
|
1252
|
-
licenseKey:
|
|
1253
|
-
watchdogConfig:
|
|
1221
|
+
editorType: n,
|
|
1222
|
+
licenseKey: i,
|
|
1223
|
+
watchdogConfig: a,
|
|
1254
1224
|
config: { plugins: o, ...s }
|
|
1255
|
-
} = t, c = this.getAttribute("data-cke-editor-id"), u = this.getAttribute("data-cke-context-id"),
|
|
1256
|
-
const { loadedPlugins:
|
|
1257
|
-
|
|
1258
|
-
await
|
|
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), b = this.hasAttribute("data-cke-watchdog"), E = 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
|
+
const { loadedPlugins: p, hasPremium: I } = await G(o);
|
|
1227
|
+
p.push(
|
|
1228
|
+
await Et({
|
|
1259
1229
|
saveDebounceMs: f,
|
|
1260
1230
|
editorId: c,
|
|
1261
1231
|
targetElement: this
|
|
1262
1232
|
})
|
|
1263
|
-
),
|
|
1264
|
-
await
|
|
1233
|
+
), V(n) && p.push(
|
|
1234
|
+
await yt(f)
|
|
1265
1235
|
);
|
|
1266
|
-
const
|
|
1267
|
-
...await
|
|
1268
|
-
|
|
1269
|
-
].filter((
|
|
1270
|
-
let
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
...y,
|
|
1281
|
-
...G(c)
|
|
1282
|
-
});
|
|
1236
|
+
const A = [
|
|
1237
|
+
...await Y(E, I),
|
|
1238
|
+
X(e || {})
|
|
1239
|
+
].filter((N) => !P(N));
|
|
1240
|
+
let T = Z(c);
|
|
1241
|
+
const D = Object.keys(T);
|
|
1242
|
+
V(n) && D.push("main"), K(T, D) || (T = await vt(c, D));
|
|
1243
|
+
let k = {
|
|
1244
|
+
...s,
|
|
1245
|
+
licenseKey: i,
|
|
1246
|
+
plugins: p,
|
|
1247
|
+
language: E,
|
|
1248
|
+
...A.length && {
|
|
1249
|
+
translations: A
|
|
1283
1250
|
}
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
return g = M(g), g = D([...C].reverse(), w.ui, g), g = ht(h, p, g), g = dt(I, g), A ? (await wt({
|
|
1295
|
-
context: A,
|
|
1296
|
-
creator: h,
|
|
1297
|
-
config: g
|
|
1298
|
-
})).editor : h.create(g);
|
|
1299
|
-
})();
|
|
1300
|
-
return S(l) || P.model.change((p) => {
|
|
1301
|
-
p.setAttributes(l, P.model.document.getRoot());
|
|
1302
|
-
}), T(a) && d && kt(P, d), P;
|
|
1251
|
+
};
|
|
1252
|
+
k = M(k), k = S([...A].reverse(), E.ui, k), k = st(w, T, k);
|
|
1253
|
+
const O = await (async () => g ? (await ut({
|
|
1254
|
+
context: g,
|
|
1255
|
+
creator: w,
|
|
1256
|
+
config: k
|
|
1257
|
+
})).editor : w.create(k))();
|
|
1258
|
+
return P(d) || O.model.change((N) => {
|
|
1259
|
+
N.setAttributes(d, O.model.document.getRoot());
|
|
1260
|
+
}), V(n) && l && ft(O, l), O;
|
|
1303
1261
|
};
|
|
1304
|
-
if (b && !
|
|
1305
|
-
const
|
|
1306
|
-
return
|
|
1307
|
-
if (
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1262
|
+
if (b && !g) {
|
|
1263
|
+
const p = await pt(h, a);
|
|
1264
|
+
return p.on("error", (I, { causesRestart: q }) => {
|
|
1265
|
+
if (q) {
|
|
1266
|
+
const A = m.the.getItem(c);
|
|
1267
|
+
A && (ct(A), m.the.unregister(c));
|
|
1310
1268
|
}
|
|
1311
|
-
}),
|
|
1312
|
-
const
|
|
1313
|
-
m.the.register(c,
|
|
1314
|
-
}), await
|
|
1269
|
+
}), p.on("restart", () => {
|
|
1270
|
+
const I = p.editor;
|
|
1271
|
+
m.the.register(c, I);
|
|
1272
|
+
}), await p.create({}), p.editor;
|
|
1315
1273
|
}
|
|
1316
|
-
return
|
|
1274
|
+
return h();
|
|
1317
1275
|
}
|
|
1318
1276
|
}
|
|
1319
|
-
function
|
|
1320
|
-
return t.every((e) => r[e]);
|
|
1277
|
+
function K(r, t) {
|
|
1278
|
+
return t.every((e) => r[e]?.element);
|
|
1321
1279
|
}
|
|
1322
|
-
async function
|
|
1323
|
-
return
|
|
1280
|
+
async function vt(r, t) {
|
|
1281
|
+
return ot(
|
|
1324
1282
|
() => {
|
|
1325
|
-
const e =
|
|
1326
|
-
if (!
|
|
1283
|
+
const e = Z(r);
|
|
1284
|
+
if (!K(e, t))
|
|
1327
1285
|
throw new Error(
|
|
1328
1286
|
`It looks like not all required root elements are present yet.
|
|
1329
1287
|
* If you want to wait for them, ensure they are registered before editor initialization.
|
|
1330
1288
|
* If you want lazy initialize roots, consider removing root values from the \`initialData\` config and assign initial data in editable components.
|
|
1331
|
-
Missing roots: ${t.filter((
|
|
1289
|
+
Missing roots: ${t.filter((n) => !e[n]?.element).join(", ")}.`
|
|
1332
1290
|
);
|
|
1333
1291
|
return e;
|
|
1334
1292
|
},
|
|
1335
1293
|
{ timeOutAfter: 2e3, retryAfter: 100 }
|
|
1336
1294
|
);
|
|
1337
1295
|
}
|
|
1338
|
-
class
|
|
1296
|
+
class At extends HTMLElement {
|
|
1339
1297
|
/**
|
|
1340
1298
|
* Stops observing the editor registry and immediately runs any pending cleanup.
|
|
1341
1299
|
*/
|
|
@@ -1345,11 +1303,11 @@ class St extends HTMLElement {
|
|
|
1345
1303
|
*/
|
|
1346
1304
|
async connectedCallback() {
|
|
1347
1305
|
await R();
|
|
1348
|
-
const t = this.getAttribute("data-cke-editor-id") ||
|
|
1349
|
-
!t || !e || (this.style.display = "block", this.unmountEffect = m.the.mountEffect(t, (
|
|
1306
|
+
const t = this.getAttribute("data-cke-editor-id") || F()[0], e = this.getAttribute("data-cke-name");
|
|
1307
|
+
!t || !e || (this.style.display = "block", this.unmountEffect = m.the.mountEffect(t, (n) => {
|
|
1350
1308
|
if (!this.isConnected)
|
|
1351
1309
|
return;
|
|
1352
|
-
const { ui:
|
|
1310
|
+
const { ui: i } = n, a = Ct(e), o = i.view[a];
|
|
1353
1311
|
if (!o)
|
|
1354
1312
|
throw new v(`Unknown UI part name: "${e}". Supported names are "toolbar" and "menubar".`);
|
|
1355
1313
|
return this.appendChild(o.element), () => {
|
|
@@ -1364,7 +1322,7 @@ class St extends HTMLElement {
|
|
|
1364
1322
|
this.style.display = "none", this.unmountEffect?.(), this.unmountEffect = null;
|
|
1365
1323
|
}
|
|
1366
1324
|
}
|
|
1367
|
-
function
|
|
1325
|
+
function Ct(r) {
|
|
1368
1326
|
switch (r) {
|
|
1369
1327
|
case "toolbar":
|
|
1370
1328
|
return "toolbar";
|
|
@@ -1375,43 +1333,43 @@ function Mt(r) {
|
|
|
1375
1333
|
return null;
|
|
1376
1334
|
}
|
|
1377
1335
|
}
|
|
1378
|
-
const
|
|
1379
|
-
"cke5-editor":
|
|
1380
|
-
"cke5-context":
|
|
1381
|
-
"cke5-ui-part":
|
|
1382
|
-
"cke5-editable":
|
|
1336
|
+
const It = {
|
|
1337
|
+
"cke5-editor": kt,
|
|
1338
|
+
"cke5-context": gt,
|
|
1339
|
+
"cke5-ui-part": At,
|
|
1340
|
+
"cke5-editable": bt
|
|
1383
1341
|
};
|
|
1384
|
-
function
|
|
1385
|
-
for (const [r, t] of Object.entries(
|
|
1342
|
+
function Tt() {
|
|
1343
|
+
for (const [r, t] of Object.entries(It))
|
|
1386
1344
|
window.customElements.get(r) || window.customElements.define(r, t);
|
|
1387
1345
|
}
|
|
1388
|
-
function
|
|
1346
|
+
function St(r) {
|
|
1389
1347
|
return x(r), {
|
|
1390
1348
|
unmount() {
|
|
1391
1349
|
}
|
|
1392
1350
|
};
|
|
1393
1351
|
}
|
|
1394
|
-
function
|
|
1352
|
+
function tt(r, t) {
|
|
1395
1353
|
const e = {
|
|
1396
1354
|
/** Value received from Blazor while the editor was focused, pending application on blur. */
|
|
1397
1355
|
pendingValue: null,
|
|
1398
1356
|
/** The last value sent to or received from Blazor to prevent circular updates. */
|
|
1399
1357
|
lastSyncedValue: null
|
|
1400
|
-
},
|
|
1358
|
+
}, n = () => {
|
|
1401
1359
|
e.pendingValue = null;
|
|
1402
|
-
},
|
|
1360
|
+
}, i = (a, o, s) => {
|
|
1403
1361
|
if (s || e.pendingValue === null)
|
|
1404
1362
|
return;
|
|
1405
1363
|
const c = t.getCurrentValue();
|
|
1406
1364
|
t.isEqual(c, e.pendingValue) || t.applyValue(e.pendingValue), e.pendingValue = null;
|
|
1407
1365
|
};
|
|
1408
|
-
return r.model.document.on("change:data",
|
|
1366
|
+
return r.model.document.on("change:data", n), r.ui.focusTracker.on("change:isFocused", i), {
|
|
1409
1367
|
/**
|
|
1410
1368
|
* Removes all editor listeners registered by this sync instance.
|
|
1411
1369
|
* Call this when the Blazor component is disposed.
|
|
1412
1370
|
*/
|
|
1413
1371
|
unmount() {
|
|
1414
|
-
r.model.document.off("change:data",
|
|
1372
|
+
r.model.document.off("change:data", n), r.ui.focusTracker.off("change:isFocused", i);
|
|
1415
1373
|
},
|
|
1416
1374
|
/**
|
|
1417
1375
|
* Checks whether the given value differs from the last synced value and, if so,
|
|
@@ -1420,24 +1378,24 @@ function nt(r, t) {
|
|
|
1420
1378
|
* Call this from the `CKEditor5ChangeDataEvent` handler to conditionally invoke
|
|
1421
1379
|
* the .NET interop method.
|
|
1422
1380
|
*/
|
|
1423
|
-
shouldNotify(
|
|
1424
|
-
return e.lastSyncedValue !== null && t.isEqual(e.lastSyncedValue,
|
|
1381
|
+
shouldNotify(a) {
|
|
1382
|
+
return e.lastSyncedValue !== null && t.isEqual(e.lastSyncedValue, a) ? !1 : (e.lastSyncedValue = a, !0);
|
|
1425
1383
|
},
|
|
1426
1384
|
/**
|
|
1427
1385
|
* Pushes a new value from Blazor into the editor.
|
|
1428
1386
|
* If the editor is currently focused, the update is deferred until blur.
|
|
1429
1387
|
* If the value matches the last synced state, the update is skipped entirely.
|
|
1430
1388
|
*/
|
|
1431
|
-
setValue(
|
|
1389
|
+
setValue(a) {
|
|
1432
1390
|
if (r.ui.focusTracker.isFocused) {
|
|
1433
|
-
e.pendingValue =
|
|
1391
|
+
e.pendingValue = a;
|
|
1434
1392
|
return;
|
|
1435
1393
|
}
|
|
1436
|
-
e.lastSyncedValue !== null && t.isEqual(e.lastSyncedValue,
|
|
1394
|
+
e.lastSyncedValue !== null && t.isEqual(e.lastSyncedValue, a) || (e.lastSyncedValue = a, t.applyValue(a));
|
|
1437
1395
|
}
|
|
1438
1396
|
};
|
|
1439
1397
|
}
|
|
1440
|
-
function
|
|
1398
|
+
function et() {
|
|
1441
1399
|
return {
|
|
1442
1400
|
unmount() {
|
|
1443
1401
|
},
|
|
@@ -1448,95 +1406,95 @@ function it() {
|
|
|
1448
1406
|
}
|
|
1449
1407
|
};
|
|
1450
1408
|
}
|
|
1451
|
-
function
|
|
1409
|
+
function rt(r, t) {
|
|
1452
1410
|
const e = /* @__PURE__ */ new Set();
|
|
1453
|
-
return (
|
|
1454
|
-
r.model.enqueueChange({ isUndoable: !1 }, (
|
|
1455
|
-
const
|
|
1456
|
-
if (
|
|
1411
|
+
return (n) => {
|
|
1412
|
+
r.model.enqueueChange({ isUndoable: !1 }, (i) => {
|
|
1413
|
+
const a = r.model.document.getRoot(t);
|
|
1414
|
+
if (a) {
|
|
1457
1415
|
for (const o of e)
|
|
1458
|
-
|
|
1459
|
-
for (const [o, s] of Object.entries(
|
|
1460
|
-
|
|
1416
|
+
n && o in n || (i.removeAttribute(o, a), e.delete(o));
|
|
1417
|
+
for (const [o, s] of Object.entries(n ?? {}))
|
|
1418
|
+
i.setAttribute(o, s, a), e.add(o);
|
|
1461
1419
|
}
|
|
1462
1420
|
});
|
|
1463
1421
|
};
|
|
1464
1422
|
}
|
|
1465
|
-
function
|
|
1466
|
-
const e = r.getAttribute("data-cke-editor-id") ??
|
|
1467
|
-
let
|
|
1468
|
-
const u = (
|
|
1469
|
-
if (!(
|
|
1423
|
+
function Rt(r, t) {
|
|
1424
|
+
const e = r.getAttribute("data-cke-editor-id") ?? F()[0], n = r.getAttribute("data-cke-root-name") ?? "main";
|
|
1425
|
+
let i = !1, a = null, o = null, s = et(), c = null;
|
|
1426
|
+
const u = (d) => {
|
|
1427
|
+
if (!(d instanceof y) || d.detail.editorId !== e)
|
|
1470
1428
|
return;
|
|
1471
|
-
const
|
|
1472
|
-
|
|
1429
|
+
const l = d.detail.roots[n];
|
|
1430
|
+
l !== void 0 && s.shouldNotify(l) && t.invokeMethodAsync("OnChangeEditableData", o, l);
|
|
1473
1431
|
};
|
|
1474
|
-
return
|
|
1475
|
-
getCurrentValue: () =>
|
|
1476
|
-
applyValue: (
|
|
1477
|
-
isEqual: (
|
|
1478
|
-
}), c =
|
|
1432
|
+
return a = m.the.mountEffect(e, (d) => (o = globalThis.DotNet.createJSObjectReference(d), s = tt(d, {
|
|
1433
|
+
getCurrentValue: () => d.getData({ rootName: n }) ?? "",
|
|
1434
|
+
applyValue: (l) => d.setData({ [n]: l }),
|
|
1435
|
+
isEqual: (l, f) => l === f
|
|
1436
|
+
}), c = rt(d, n), () => {
|
|
1479
1437
|
s.unmount(), o && (globalThis.DotNet?.disposeJSObjectReference(o), o = null), c = null;
|
|
1480
|
-
})), document.body.addEventListener(
|
|
1438
|
+
})), document.body.addEventListener(y.EVENT_NAME, u), x(r), {
|
|
1481
1439
|
/**
|
|
1482
1440
|
* Cleans up all event listeners when the Blazor component is disposed.
|
|
1483
1441
|
*/
|
|
1484
1442
|
unmount() {
|
|
1485
|
-
|
|
1443
|
+
i || (document.body.removeEventListener(y.EVENT_NAME, u), a?.(), a = null, i = !0);
|
|
1486
1444
|
},
|
|
1487
1445
|
/**
|
|
1488
1446
|
* Updates this editable root's data from Blazor.
|
|
1489
1447
|
* If the editor is focused, the update is deferred until blur to avoid interrupting the user.
|
|
1490
1448
|
*/
|
|
1491
|
-
setValue: async (
|
|
1492
|
-
|
|
1449
|
+
setValue: async (d) => {
|
|
1450
|
+
i || (await m.the.waitFor(e), s.setValue(d));
|
|
1493
1451
|
},
|
|
1494
1452
|
/**
|
|
1495
1453
|
* Updates the root attributes on the editor. This is useful when the Blazor component
|
|
1496
1454
|
* re-renders with new root attributes.
|
|
1497
1455
|
*/
|
|
1498
|
-
setRootAttributes: async (
|
|
1499
|
-
|
|
1456
|
+
setRootAttributes: async (d) => {
|
|
1457
|
+
i || (await m.the.waitFor(e), c?.(d));
|
|
1500
1458
|
}
|
|
1501
1459
|
};
|
|
1502
1460
|
}
|
|
1503
|
-
function
|
|
1461
|
+
function xt(r, t) {
|
|
1504
1462
|
const e = r.getAttribute("data-cke-editor-id");
|
|
1505
|
-
let
|
|
1463
|
+
let n = !1, i = null, a = et(), o = null, s = null;
|
|
1506
1464
|
const c = (u) => {
|
|
1507
|
-
!(u instanceof
|
|
1465
|
+
!(u instanceof y) || u.detail.editorId !== e || a.shouldNotify(u.detail.roots) && t.invokeMethodAsync("OnChangeEditorData", s, u.detail.roots);
|
|
1508
1466
|
};
|
|
1509
|
-
return
|
|
1510
|
-
s = globalThis.DotNet.createJSObjectReference(u),
|
|
1511
|
-
getCurrentValue: () =>
|
|
1512
|
-
applyValue: (
|
|
1513
|
-
isEqual:
|
|
1514
|
-
}), o =
|
|
1515
|
-
const
|
|
1516
|
-
const
|
|
1517
|
-
t.invokeMethodAsync(
|
|
1467
|
+
return i = m.the.mountEffect(e, (u) => {
|
|
1468
|
+
s = globalThis.DotNet.createJSObjectReference(u), a = tt(u, {
|
|
1469
|
+
getCurrentValue: () => J(u),
|
|
1470
|
+
applyValue: (l) => u.setData(l),
|
|
1471
|
+
isEqual: at
|
|
1472
|
+
}), o = rt(u, "main");
|
|
1473
|
+
const d = (l, f, b) => {
|
|
1474
|
+
const E = b ? "OnEditorFocus" : "OnEditorBlur";
|
|
1475
|
+
t.invokeMethodAsync(E, s);
|
|
1518
1476
|
};
|
|
1519
|
-
return u.ui.focusTracker.on("change:isFocused",
|
|
1520
|
-
u.ui.focusTracker.off("change:isFocused",
|
|
1477
|
+
return u.ui.focusTracker.on("change:isFocused", d), t.invokeMethodAsync("OnEditorReady", s), () => {
|
|
1478
|
+
u.ui.focusTracker.off("change:isFocused", d), a.unmount(), s && (globalThis.DotNet?.disposeJSObjectReference(s), s = null), o = null;
|
|
1521
1479
|
};
|
|
1522
|
-
}), document.body.addEventListener(
|
|
1480
|
+
}), document.body.addEventListener(y.EVENT_NAME, c), Tt(), x(r), {
|
|
1523
1481
|
/**
|
|
1524
1482
|
* Updates the editor data from Blazor. If the editor is focused, the update is deferred until blur to avoid interrupting the user.
|
|
1525
1483
|
*/
|
|
1526
1484
|
setValue: async (u) => {
|
|
1527
|
-
|
|
1485
|
+
n || (await m.the.waitFor(e), a.setValue(u));
|
|
1528
1486
|
},
|
|
1529
1487
|
/**
|
|
1530
1488
|
* Updates the root attributes on the editor instance.
|
|
1531
1489
|
*/
|
|
1532
1490
|
setRootAttributes: async (u) => {
|
|
1533
|
-
|
|
1491
|
+
n || (await m.the.waitFor(e), o?.(u));
|
|
1534
1492
|
},
|
|
1535
1493
|
/**
|
|
1536
1494
|
* Cleans up all event listeners when the Blazor component is disposed.
|
|
1537
1495
|
*/
|
|
1538
1496
|
unmount() {
|
|
1539
|
-
|
|
1497
|
+
n || (document.body.removeEventListener(y.EVENT_NAME, c), i?.(), i = null, n = !0);
|
|
1540
1498
|
},
|
|
1541
1499
|
/**
|
|
1542
1500
|
* Installs the custom image upload adapter that delegates uploads to Blazor.
|
|
@@ -1544,26 +1502,26 @@ function _t(r, t) {
|
|
|
1544
1502
|
* to avoid unnecessary overhead for consumers that don't use this feature.
|
|
1545
1503
|
*/
|
|
1546
1504
|
attachImageUploadAdapter: async () => {
|
|
1547
|
-
|
|
1548
|
-
|
|
1505
|
+
n || m.the.mountEffect(e, (u) => {
|
|
1506
|
+
Ot(u, t);
|
|
1549
1507
|
});
|
|
1550
1508
|
}
|
|
1551
1509
|
};
|
|
1552
1510
|
}
|
|
1553
|
-
function
|
|
1511
|
+
function Ot(r, t) {
|
|
1554
1512
|
if (!r.plugins.has("FileRepository"))
|
|
1555
1513
|
return;
|
|
1556
1514
|
const e = r.plugins.get("FileRepository");
|
|
1557
|
-
e.createUploadAdapter = (
|
|
1558
|
-
let
|
|
1515
|
+
e.createUploadAdapter = (n) => {
|
|
1516
|
+
let i = !1;
|
|
1559
1517
|
return {
|
|
1560
1518
|
async upload() {
|
|
1561
|
-
const
|
|
1562
|
-
if (
|
|
1519
|
+
const a = await n.file;
|
|
1520
|
+
if (i)
|
|
1563
1521
|
throw new Error("Upload aborted.");
|
|
1564
|
-
const o = await
|
|
1565
|
-
fileName:
|
|
1566
|
-
mimeType:
|
|
1522
|
+
const o = await Nt(a), s = await t.invokeMethodAsync("OnEditorImageUpload", {
|
|
1523
|
+
fileName: a.name,
|
|
1524
|
+
mimeType: a.type,
|
|
1567
1525
|
payload: o
|
|
1568
1526
|
});
|
|
1569
1527
|
if (!s)
|
|
@@ -1573,21 +1531,21 @@ function xt(r, t) {
|
|
|
1573
1531
|
return { default: s };
|
|
1574
1532
|
},
|
|
1575
1533
|
abort() {
|
|
1576
|
-
|
|
1534
|
+
i = !0;
|
|
1577
1535
|
}
|
|
1578
1536
|
};
|
|
1579
1537
|
};
|
|
1580
1538
|
}
|
|
1581
|
-
function
|
|
1539
|
+
function Nt(r) {
|
|
1582
1540
|
return new Promise((t, e) => {
|
|
1583
|
-
const
|
|
1584
|
-
|
|
1585
|
-
const
|
|
1586
|
-
t(
|
|
1587
|
-
},
|
|
1541
|
+
const n = new FileReader();
|
|
1542
|
+
n.onload = () => {
|
|
1543
|
+
const i = n.result, a = i.split(",")[1] ?? i;
|
|
1544
|
+
t(a);
|
|
1545
|
+
}, n.onerror = () => e(n.error), n.readAsDataURL(r);
|
|
1588
1546
|
});
|
|
1589
1547
|
}
|
|
1590
|
-
function
|
|
1548
|
+
function Dt(r) {
|
|
1591
1549
|
return x(r), {
|
|
1592
1550
|
unmount() {
|
|
1593
1551
|
}
|
|
@@ -1595,17 +1553,17 @@ function qt(r) {
|
|
|
1595
1553
|
}
|
|
1596
1554
|
export {
|
|
1597
1555
|
v as CKEditor5BlazorError,
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1556
|
+
y as CKEditor5ChangeDataEvent,
|
|
1557
|
+
C as ContextsRegistry,
|
|
1558
|
+
_ as CustomEditorPluginsRegistry,
|
|
1559
|
+
bt as EditableComponentElement,
|
|
1560
|
+
kt as EditorComponentElement,
|
|
1603
1561
|
m as EditorsRegistry,
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1562
|
+
At as UIPartComponentElement,
|
|
1563
|
+
St as createContextBlazorInterop,
|
|
1564
|
+
Rt as createEditableBlazorInterop,
|
|
1565
|
+
xt as createEditorBlazorInterop,
|
|
1566
|
+
Dt as createUIPartBlazorInterop,
|
|
1567
|
+
Tt as ensureEditorElementsRegistered
|
|
1610
1568
|
};
|
|
1611
1569
|
//# sourceMappingURL=index.mjs.map
|