@ckeditor/ckeditor5-core 48.2.0 → 48.3.0-alpha.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/accessibility.d.ts +339 -339
- package/dist/augmentation.d.ts +8 -8
- package/dist/command.d.ts +188 -191
- package/dist/commandcollection.d.ts +76 -76
- package/dist/context.d.ts +238 -238
- package/dist/contextplugin.d.ts +57 -60
- package/dist/editingkeystrokehandler.d.ts +49 -49
- package/dist/editor/editor.d.ts +538 -576
- package/dist/editor/editorconfig.d.ts +1674 -1634
- package/dist/editor/utils/attachtoform.d.ts +12 -12
- package/dist/editor/utils/editorusagedata.d.ts +51 -51
- package/dist/editor/utils/elementapimixin.d.ts +39 -29
- package/dist/editor/utils/normalizerootsconfig.d.ts +65 -65
- package/dist/editor/utils/registerandinitializerootconfigattributes.d.ts +16 -12
- package/dist/editor/utils/rootacceptsblocks.d.ts +13 -13
- package/dist/editor/utils/securesourceelement.d.ts +13 -13
- package/dist/editor/utils/verifyrootelements.d.ts +8 -8
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +27 -27
- package/dist/index.js +3416 -3459
- package/dist/index.js.map +1 -1
- package/dist/legacyerrors.d.ts +0 -4
- package/dist/multicommand.d.ts +61 -61
- package/dist/pendingactions.d.ts +111 -111
- package/dist/plugin.d.ts +291 -283
- package/dist/plugincollection.d.ts +109 -108
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/dist/typings.d.ts +10 -7
- package/package.json +5 -5
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { Editor } from
|
|
6
|
-
import type { ElementApi } from
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { Editor } from "../editor.js";
|
|
6
|
+
import type { ElementApi } from "./elementapimixin.js";
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
* Checks if the editor is initialized on a `<textarea>` element that belongs to a form. If yes, it updates the editor's element
|
|
9
|
+
* content before submitting the form.
|
|
10
|
+
*
|
|
11
|
+
* This helper requires the {@link module:core/editor/utils/elementapimixin~ElementApi ElementApi interface}.
|
|
12
|
+
*
|
|
13
|
+
* @param editor Editor instance.
|
|
14
|
+
*/
|
|
15
15
|
export declare function attachToForm(editor: Editor & ElementApi): void;
|
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { type Editor } from
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type Editor } from "../editor.js";
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
* This part of the code is not executed in open-source implementations using a GPL key.
|
|
8
|
+
* It only runs when a specific license key is provided. If you are uncertain whether
|
|
9
|
+
* this applies to your installation, please contact our support team.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
13
|
export declare function getEditorUsageData(editor: Editor): EditorUsageData;
|
|
14
14
|
declare global {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
interface Window {
|
|
16
|
+
CKEDITOR_PAGE_SESSION_ID?: string;
|
|
17
|
+
}
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
22
|
export type EditorUsageData = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
23
|
+
sessionId: string;
|
|
24
|
+
pageSessionId: string;
|
|
25
|
+
hostname: string;
|
|
26
|
+
version: string;
|
|
27
|
+
type: `${string}Editor`;
|
|
28
|
+
plugins: Array<PluginUsageData>;
|
|
29
|
+
toolbar: {
|
|
30
|
+
main?: ToolbarUsageData;
|
|
31
|
+
block?: ToolbarUsageData;
|
|
32
|
+
balloon?: ToolbarUsageData;
|
|
33
|
+
};
|
|
34
|
+
menuBar: {
|
|
35
|
+
isVisible: boolean;
|
|
36
|
+
};
|
|
37
|
+
language: {
|
|
38
|
+
ui: string;
|
|
39
|
+
content: string;
|
|
40
|
+
};
|
|
41
|
+
distribution: {
|
|
42
|
+
channel: string;
|
|
43
|
+
};
|
|
44
|
+
env: EnvUsageData;
|
|
45
|
+
integration: {
|
|
46
|
+
[integrationName: string]: IntegrationUsageData;
|
|
47
|
+
};
|
|
48
48
|
};
|
|
49
49
|
type IntegrationUsageData = {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
version: string;
|
|
51
|
+
frameworkVersion?: string;
|
|
52
52
|
};
|
|
53
53
|
type EnvUsageData = {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
os: "mac" | "windows" | "ios" | "android" | "unknown";
|
|
55
|
+
browser: "safari" | "gecko" | "blink" | "unknown";
|
|
56
56
|
};
|
|
57
57
|
type ToolbarUsageData = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
items: Array<string>;
|
|
59
|
+
isMultiline: boolean;
|
|
60
|
+
shouldNotGroupWhenFull: boolean;
|
|
61
61
|
};
|
|
62
62
|
type PluginUsageData = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
name: string;
|
|
64
|
+
isPremium: boolean;
|
|
65
|
+
isOfficial: boolean;
|
|
66
|
+
isContext: boolean;
|
|
67
67
|
};
|
|
68
68
|
export {};
|
|
@@ -1,35 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { type Constructor, type Mixed } from
|
|
9
|
-
import { type Editor } from
|
|
6
|
+
* @module core/editor/utils/elementapimixin
|
|
7
|
+
*/
|
|
8
|
+
import { type Constructor, type Mixed } from "@ckeditor/ckeditor5-utils";
|
|
9
|
+
import { type Editor } from "../editor.js";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Constructor returned by {@link ~ElementApiMixin}. Use it to name a mixin base class before extending it.
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* const MyElementApiBase: ElementApiMixinConstructor<typeof BaseClass> = ElementApiMixin( BaseClass );
|
|
15
|
+
*
|
|
16
|
+
* class MyElementApi extends MyElementApiBase {}
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export type ElementApiMixinConstructor<Base extends Constructor<Editor>> = Mixed<Base, ElementApi>;
|
|
14
20
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
* Implementation of the {@link module:core/editor/utils/elementapimixin~ElementApi}.
|
|
22
|
+
*/
|
|
23
|
+
export declare function ElementApiMixin<Base extends Constructor<Editor>>(base: Base): ElementApiMixinConstructor<Base>;
|
|
24
|
+
/**
|
|
25
|
+
* Interface describing an editor that replaced a DOM element (was "initialized on an element").
|
|
26
|
+
*
|
|
27
|
+
* Such an editor should provide a method to
|
|
28
|
+
* {@link module:core/editor/utils/elementapimixin~ElementApi#updateSourceElement update the replaced element with the current data}.
|
|
29
|
+
*/
|
|
20
30
|
export interface ElementApi {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The element on which the editor has been initialized.
|
|
33
|
+
*
|
|
34
|
+
* @readonly
|
|
35
|
+
*/
|
|
36
|
+
sourceElement: HTMLElement | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Updates the {@link #sourceElement editor source element}'s content with the data if the
|
|
39
|
+
* {@link module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy `updateSourceElementOnDestroy`}
|
|
40
|
+
* configuration option is set to `true`.
|
|
41
|
+
*
|
|
42
|
+
* @param data Data that the {@link #sourceElement editor source element} should be updated with.
|
|
43
|
+
*/
|
|
44
|
+
updateSourceElement(data?: string): void;
|
|
35
45
|
}
|
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { EditorConfig, ViewRootElementDefinition } from
|
|
9
|
-
import { type Config } from
|
|
6
|
+
* @module core/editor/utils/normalizerootsconfig
|
|
7
|
+
*/
|
|
8
|
+
import type { EditorConfig, ViewRootElementDefinition } from "../editorconfig.js";
|
|
9
|
+
import { type Config } from "@ckeditor/ckeditor5-utils";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
* Normalizes the editor roots configuration. It ensures that all root configurations are defined in `config.roots`
|
|
12
|
+
* and that they have `initialData` defined.
|
|
13
|
+
*
|
|
14
|
+
* It normalizes a single-root configuration (where `config.root` is used) to a multi-root configuration
|
|
15
|
+
* (where all roots are defined in `config.roots`). This is considered a standard configuration format,
|
|
16
|
+
* so the editor features can always expect roots to be defined in `config.roots`.
|
|
17
|
+
*
|
|
18
|
+
* It also handles legacy configuration options, such as `config.initialData`, `config.placeholder`, and `config.label`.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
22
|
export declare function normalizeRootsConfig(sourceElementsOrData: HTMLElement | string | Record<string, HTMLElement> | Record<string, string>, config: Config<EditorConfig>, defaultRootName?: string | false, separateAttachTo?: boolean): void;
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
* Normalizes the parameters passed to the editor constructor when a single root is used. It supports both of the following signatures:
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* new Editor( editorConfig: EditorConfig );
|
|
28
|
+
* new Editor( sourceElementOrData: HTMLElement | string, editorConfig: EditorConfig );
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
33
|
export declare function normalizeSingleRootEditorConstructorParams(sourceElementOrDataOrConfig: HTMLElement | string | EditorConfig, editorConfig: EditorConfig): {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
sourceElementOrData: HTMLElement | string;
|
|
35
|
+
editorConfig: EditorConfig;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
* Normalizes the parameters passed to the editor constructor when a multi root is used. It supports both of the following signatures:
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* new Editor( editorConfig: EditorConfig );
|
|
42
|
+
* new Editor( sourceElementsOrData: Record<string, string> | Record<string, HTMLElement>, editorConfig: EditorConfig );
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
47
|
export declare function normalizeMultiRootEditorConstructorParams(sourceElementOrDataOrConfig: Record<string, string> | Record<string, HTMLElement>, editorConfig: EditorConfig): {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
sourceElementsOrData: Record<string, string> | Record<string, HTMLElement>;
|
|
49
|
+
editorConfig: EditorConfig;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
52
|
+
* Normalizes the value passed in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`} into a
|
|
53
|
+
* canonical form (`HTMLElement` or {@link module:core/editor/editorconfig~ViewRootElementDefinition}) that the UI layer
|
|
54
|
+
* can consume directly.
|
|
55
|
+
*
|
|
56
|
+
* Accepts:
|
|
57
|
+
*
|
|
58
|
+
* * an existing `HTMLElement` - returned as is, so the editor wraps it in place,
|
|
59
|
+
* * a tag name string (e.g. `'h1'`) - turned into `{ name: 'h1' }`,
|
|
60
|
+
* * a {@link module:core/editor/editorconfig~ViewRootElementDefinition} object - reshaped so `classes` becomes an
|
|
61
|
+
* array and `attributes.class` is lifted into it.
|
|
62
|
+
*
|
|
63
|
+
* The `class` attribute may be passed either as the dedicated `classes` field (string or array of strings) or as a
|
|
64
|
+
* `class` key inside `attributes`. They are concatenated. The `style` attribute may be passed either as the `styles`
|
|
65
|
+
* object or as a `style` string inside `attributes`. When both are provided, the object form takes precedence and a
|
|
66
|
+
* warning is logged.
|
|
67
|
+
*
|
|
68
|
+
* The `<textarea>` tag name is rejected as it cannot host a rich-text editable.
|
|
69
|
+
*
|
|
70
|
+
* Already used internally by {@link ~normalizeRootsConfig `normalizeRootsConfig()`} for `config.root.element` /
|
|
71
|
+
* `config.roots.*.element`. Exported for callers that bypass the regular config-normalization pass, e.g.
|
|
72
|
+
* {@link module:editor-multi-root/multirooteditor~MultiRootEditor#addRoot `MultiRootEditor.addRoot()`}
|
|
73
|
+
* and {@link module:editor-multi-root/multirooteditor~MultiRootEditor#createEditable `MultiRootEditor.createEditable()`}.
|
|
74
|
+
*
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
77
|
export declare function normalizeViewRootElementDefinition(spec: HTMLElement | string | ViewRootElementDefinition | undefined): HTMLElement | ViewRootElementDefinition | undefined;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { Editor } from
|
|
6
|
+
* @module core/editor/utils/registerandinitializerootconfigattributes
|
|
7
|
+
*/
|
|
8
|
+
import type { Editor } from "../editor.js";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
* @
|
|
15
|
-
|
|
10
|
+
* Registers and initializes root attributes from the editor configuration:
|
|
11
|
+
*
|
|
12
|
+
* * the attributes from
|
|
13
|
+
* {@link module:core/editor/editorconfig~RootConfig#modelAttributes `config.root(s).<rootName>.modelAttributes`}, and
|
|
14
|
+
* * the {@link module:core/editor/editorconfig~RootConfig#description `description`} and
|
|
15
|
+
* {@link module:core/editor/editorconfig~RootConfig#title `title`} fields, stored as the `$description` and `$title`
|
|
16
|
+
* root attributes respectively.
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
16
20
|
export declare function registerAndInitializeRootConfigAttributes(editor: Editor): void;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { Editor } from
|
|
6
|
+
* @module core/editor/utils/rootacceptsblocks
|
|
7
|
+
*/
|
|
8
|
+
import type { Editor } from "../editor.js";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
* Returns whether the model root with the given name accepts `$block` children according to the editor's schema.
|
|
11
|
+
*
|
|
12
|
+
* Call this once the plugin initialization phase is finished — typically during UI init or right after creating
|
|
13
|
+
* a new editable — so the schema reflects any plugin-registered root types or additional content rules.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
17
|
export declare function rootAcceptsBlocks(editor: Editor, rootName: string): boolean;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { Editor } from
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { Editor } from "../editor.js";
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
* Marks the source element on which the editor was initialized. This prevents other editor instances from using this element.
|
|
8
|
+
*
|
|
9
|
+
* Running multiple editor instances on the same source element causes various issues and it is
|
|
10
|
+
* crucial this helper is called as soon as the source element is known to prevent collisions.
|
|
11
|
+
*
|
|
12
|
+
* @param editor Editor instance.
|
|
13
|
+
* @param sourceElement Element to bind with the editor instance.
|
|
14
|
+
*/
|
|
15
15
|
export declare function secureSourceElement(editor: Editor, sourceElement: HTMLElement & {
|
|
16
|
-
|
|
16
|
+
ckeditorInstance?: Editor;
|
|
17
17
|
}): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { Editor } from
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { Editor } from "../editor.js";
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
* Verifies that all model root elements are registered in the schema as limit elements.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
11
|
export declare function verifyRootElements(editor: Editor): void;
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../theme/core.css","index.css"],"names":[],"mappings":";;;;AAKA,CAAA,IAAA,CAAA;ACJA,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK;AACzE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM;AAChC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG;AAC/B,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM;AACjC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI;AACxC;;
|
|
1
|
+
{"version":3,"sources":["../theme/core.css","index.css"],"names":[],"mappings":";;;;AAKA,CAAA,IAAA,CAAA;ACJA,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK;AACzE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM;AAChC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG;AAC/B,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM;AACjC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI;AACxC;;ADSA,CAAA,EAAA,CAAA,OAAA,CAAA;ACNA,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;AAC5C,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;AACxC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AACrC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;AAC5C,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AAC1C,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;AAChD;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["/*\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n:root {\n\t--ck-content-font-family: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n\t--ck-content-font-size: medium;\n\t/* See https://github.com/ckeditor/ckeditor5-commercial/commit/b167b86bf4a669758ff401e4b9a6c94413d76196 */\n\t/* eslint-disable-next-line ckeditor5-rules/no-disallowed-color-formats */\n\t--ck-content-font-color: #000;\n\t--ck-content-line-height: 1.5;\n\t--ck-content-word-break: normal;\n\t--ck-content-overflow-wrap: break-word;\n}\n\n.ck-content {\n\tfont-family: var(--ck-content-font-family);\n\tfont-size: var(--ck-content-font-size);\n\tcolor: var(--ck-content-font-color);\n\tline-height: var(--ck-content-line-height);\n\tword-break: var(--ck-content-word-break);\n\toverflow-wrap: var(--ck-content-overflow-wrap);\n}\n",":root {\n --ck-content-font-family: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n --ck-content-font-size: medium;\n --ck-content-font-color: #000;\n --ck-content-line-height: 1.5;\n --ck-content-word-break: normal;\n --ck-content-overflow-wrap: break-word;\n}\n\n.ck-content {\n font-family: var(--ck-content-font-family);\n font-size: var(--ck-content-font-size);\n color: var(--ck-content-font-color);\n line-height: var(--ck-content-line-height);\n word-break: var(--ck-content-word-break);\n overflow-wrap: var(--ck-content-overflow-wrap);\n}\n\n/*# sourceMappingURL=index.css.map */"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { Plugin, type PluginDependencies, type PluginConstructor, type PluginInterface, type PluginClassConstructor, type PluginFunctionConstructor, type PluginStaticMembers, type LoadedPlugins } from
|
|
9
|
-
export { Command, type CommandExecuteEvent } from
|
|
10
|
-
export { MultiCommand } from
|
|
11
|
-
export { CommandCollection, type CommandsMap } from
|
|
12
|
-
export { type PluginsMap, PluginCollection, type PluginEntry } from
|
|
13
|
-
export { Context, type ContextConfig } from
|
|
14
|
-
export { ContextPlugin, type ContextInterface, type ContextPluginDependencies } from
|
|
15
|
-
export { EditingKeystrokeHandler, type EditingKeystrokeCallback } from
|
|
16
|
-
export type { PartialBy, NonEmptyArray, HexColor } from
|
|
17
|
-
export { Editor, type EditorRootAttributes, type EditorCollectUsageDataEvent, type EditorReadyEvent, type EditorDestroyEvent, type LicenseErrorReason as _LicenseErrorReason } from
|
|
18
|
-
export type { EditorConfig, RootConfig, ViewRootElementDefinition, LanguageConfig, ToolbarConfig, ToolbarConfigItem, UiConfig, ViewportOffsetConfig, PoweredByConfig } from
|
|
19
|
-
export { attachToForm } from
|
|
20
|
-
export { ElementApiMixin, type ElementApi } from
|
|
21
|
-
export { secureSourceElement } from
|
|
22
|
-
export { registerAndInitializeRootConfigAttributes } from
|
|
23
|
-
export { normalizeRootsConfig, normalizeSingleRootEditorConstructorParams, normalizeMultiRootEditorConstructorParams, normalizeViewRootElementDefinition } from
|
|
24
|
-
export { verifyRootElements } from
|
|
25
|
-
export { rootAcceptsBlocks } from
|
|
26
|
-
export { PendingActions, type PendingAction, type PendingActionsAddEvent, type PendingActionsRemoveEvent } from
|
|
27
|
-
export { Accessibility, DEFAULT_GROUP_ID as _DEFAULT_ACCESSIBILITY_GROUP_ID, type AddKeystrokeInfoCategoryData, type AddKeystrokeInfoGroupData, type AddKeystrokeInfosData, type KeystrokeInfoDefinition, type KeystrokeInfoDefinitions, type KeystrokeInfoGroupDefinition, type KeystrokeInfoCategoryDefinition } from
|
|
28
|
-
export { getEditorUsageData as _getEditorUsageData, type EditorUsageData as _EditorUsageData } from
|
|
29
|
-
import
|
|
6
|
+
* @module core
|
|
7
|
+
*/
|
|
8
|
+
export { Plugin, type PluginDependenciesOf, type PluginDependencies, type PluginConstructor, type PluginInterface, type PluginClassConstructor, type PluginFunctionConstructor, type PluginStaticMembers, type LoadedPlugins } from "./plugin.js";
|
|
9
|
+
export { Command, type CommandExecuteEvent } from "./command.js";
|
|
10
|
+
export { MultiCommand } from "./multicommand.js";
|
|
11
|
+
export { CommandCollection, type CommandsMap } from "./commandcollection.js";
|
|
12
|
+
export { type PluginsMap, PluginCollection, type PluginEntry } from "./plugincollection.js";
|
|
13
|
+
export { Context, type ContextConfig } from "./context.js";
|
|
14
|
+
export { ContextPlugin, type ContextInterface, type ContextPluginDependencies } from "./contextplugin.js";
|
|
15
|
+
export { EditingKeystrokeHandler, type EditingKeystrokeCallback } from "./editingkeystrokehandler.js";
|
|
16
|
+
export type { PartialBy, NonEmptyArray, HexColor } from "./typings.js";
|
|
17
|
+
export { Editor, type EditorRootAttributes, type EditorCollectUsageDataEvent, type EditorReadyEvent, type EditorDestroyEvent, type LicenseErrorReason as _LicenseErrorReason } from "./editor/editor.js";
|
|
18
|
+
export type { EditorConfig, RootConfig, ViewRootElementDefinition, LanguageConfig, ToolbarConfig, ToolbarConfigItem, UiConfig, ViewportOffsetConfig, PoweredByConfig } from "./editor/editorconfig.js";
|
|
19
|
+
export { attachToForm } from "./editor/utils/attachtoform.js";
|
|
20
|
+
export { ElementApiMixin, type ElementApi, type ElementApiMixinConstructor } from "./editor/utils/elementapimixin.js";
|
|
21
|
+
export { secureSourceElement } from "./editor/utils/securesourceelement.js";
|
|
22
|
+
export { registerAndInitializeRootConfigAttributes } from "./editor/utils/registerandinitializerootconfigattributes.js";
|
|
23
|
+
export { normalizeRootsConfig, normalizeSingleRootEditorConstructorParams, normalizeMultiRootEditorConstructorParams, normalizeViewRootElementDefinition } from "./editor/utils/normalizerootsconfig.js";
|
|
24
|
+
export { verifyRootElements } from "./editor/utils/verifyrootelements.js";
|
|
25
|
+
export { rootAcceptsBlocks } from "./editor/utils/rootacceptsblocks.js";
|
|
26
|
+
export { PendingActions, type PendingAction, type PendingActionsAddEvent, type PendingActionsRemoveEvent } from "./pendingactions.js";
|
|
27
|
+
export { Accessibility, DEFAULT_GROUP_ID as _DEFAULT_ACCESSIBILITY_GROUP_ID, type AddKeystrokeInfoCategoryData, type AddKeystrokeInfoGroupData, type AddKeystrokeInfosData, type KeystrokeInfoDefinition, type KeystrokeInfoDefinitions, type KeystrokeInfoGroupDefinition, type KeystrokeInfoCategoryDefinition } from "./accessibility.js";
|
|
28
|
+
export { getEditorUsageData as _getEditorUsageData, type EditorUsageData as _EditorUsageData } from "./editor/utils/editorusagedata.js";
|
|
29
|
+
import "./augmentation.js";
|