@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
package/dist/legacyerrors.d.ts
CHANGED
package/dist/multicommand.d.ts
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
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 { Command } from
|
|
9
|
-
import { type PriorityString } from
|
|
6
|
+
* @module core/multicommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from "./command.js";
|
|
9
|
+
import { type PriorityString } from "@ckeditor/ckeditor5-utils";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
11
|
+
* A CKEditor command that aggregates other commands.
|
|
12
|
+
*
|
|
13
|
+
* This command is used to proxy multiple commands. The multi-command is enabled when
|
|
14
|
+
* at least one of its registered child commands is enabled.
|
|
15
|
+
* When executing a multi-command, the first enabled command with highest priority will be executed.
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* const multiCommand = new MultiCommand( editor );
|
|
19
|
+
*
|
|
20
|
+
* const commandFoo = new Command( editor );
|
|
21
|
+
* const commandBar = new Command( editor );
|
|
22
|
+
*
|
|
23
|
+
* // Register a child command.
|
|
24
|
+
* multiCommand.registerChildCommand( commandFoo );
|
|
25
|
+
* // Register a child command with a low priority.
|
|
26
|
+
* multiCommand.registerChildCommand( commandBar, { priority: 'low' } );
|
|
27
|
+
*
|
|
28
|
+
* // Enable one of the commands.
|
|
29
|
+
* commandBar.isEnabled = true;
|
|
30
|
+
*
|
|
31
|
+
* multiCommand.execute(); // Will execute commandBar.
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
34
|
export declare class MultiCommand extends Command {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Registered child commands definitions.
|
|
37
|
+
*/
|
|
38
|
+
private _childCommandsDefinitions;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
override refresh(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Executes the first enabled command which has the highest priority of all registered child commands.
|
|
45
|
+
*
|
|
46
|
+
* @returns The value returned by the {@link module:core/command~Command#execute `command.execute()`}.
|
|
47
|
+
*/
|
|
48
|
+
override execute(...args: Array<unknown>): unknown;
|
|
49
|
+
/**
|
|
50
|
+
* Registers a child command.
|
|
51
|
+
*
|
|
52
|
+
* @param options An object with configuration options.
|
|
53
|
+
* @param options.priority Priority of a command to register.
|
|
54
|
+
*/
|
|
55
|
+
registerChildCommand(command: Command, options?: {
|
|
56
|
+
priority?: PriorityString;
|
|
57
|
+
}): void;
|
|
58
|
+
/**
|
|
59
|
+
* Checks if any of child commands is enabled.
|
|
60
|
+
*/
|
|
61
|
+
private _checkEnabled;
|
|
62
|
+
/**
|
|
63
|
+
* Returns a first enabled command with the highest priority or `undefined` if none of them is enabled.
|
|
64
|
+
*/
|
|
65
|
+
private _getFirstEnabledCommand;
|
|
66
66
|
}
|
package/dist/pendingactions.d.ts
CHANGED
|
@@ -1,122 +1,122 @@
|
|
|
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 { ContextPlugin } from
|
|
9
|
-
import { type CollectionAddEvent, type CollectionRemoveEvent, type Observable } from
|
|
6
|
+
* @module core/pendingactions
|
|
7
|
+
*/
|
|
8
|
+
import { ContextPlugin } from "./contextplugin.js";
|
|
9
|
+
import { type CollectionAddEvent, type CollectionRemoveEvent, type Observable } from "@ckeditor/ckeditor5-utils";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
11
|
+
* The list of pending editor actions.
|
|
12
|
+
*
|
|
13
|
+
* This plugin should be used to synchronise plugins that execute long-lasting actions
|
|
14
|
+
* (e.g. file upload) with the editor integration. It gives the developer who integrates the editor
|
|
15
|
+
* an easy way to check if there are any actions pending whenever such information is needed.
|
|
16
|
+
* All plugins that register a pending action also provide a message about the action that is ongoing
|
|
17
|
+
* which can be displayed to the user. This lets them decide if they want to interrupt the action or wait.
|
|
18
|
+
*
|
|
19
|
+
* Adding and updating a pending action:
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* const pendingActions = editor.plugins.get( 'PendingActions' );
|
|
23
|
+
* const action = pendingActions.add( 'Upload in progress: 0%.' );
|
|
24
|
+
*
|
|
25
|
+
* // You can update the message:
|
|
26
|
+
* action.message = 'Upload in progress: 10%.';
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* Removing a pending action:
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* const pendingActions = editor.plugins.get( 'PendingActions' );
|
|
33
|
+
* const action = pendingActions.add( 'Unsaved changes.' );
|
|
34
|
+
*
|
|
35
|
+
* pendingActions.remove( action );
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* Getting pending actions:
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* const pendingActions = editor.plugins.get( 'PendingActions' );
|
|
42
|
+
*
|
|
43
|
+
* const action1 = pendingActions.add( 'Action 1' );
|
|
44
|
+
* const action2 = pendingActions.add( 'Action 2' );
|
|
45
|
+
*
|
|
46
|
+
* pendingActions.first; // Returns action1
|
|
47
|
+
* Array.from( pendingActions ); // Returns [ action1, action2 ]
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* This plugin is used by features like {@link module:upload/filerepository~FileRepository} to register their ongoing actions
|
|
51
|
+
* and by features like {@link module:autosave/autosave~Autosave} to detect whether there are any ongoing actions.
|
|
52
|
+
* Read more about saving the data in the
|
|
53
|
+
* {@glink getting-started/setup/getting-and-setting-data Saving and getting data} guide.
|
|
54
|
+
*/
|
|
55
55
|
export declare class PendingActions extends ContextPlugin implements Iterable<PendingAction> {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Defines whether there is any registered pending action.
|
|
58
|
+
*
|
|
59
|
+
* @readonly
|
|
60
|
+
* @observable
|
|
61
|
+
*/
|
|
62
|
+
hasAny: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* A list of pending actions.
|
|
65
|
+
*/
|
|
66
|
+
private _actions;
|
|
67
|
+
/**
|
|
68
|
+
* @inheritDoc
|
|
69
|
+
*/
|
|
70
|
+
static get pluginName(): "PendingActions";
|
|
71
|
+
/**
|
|
72
|
+
* @inheritDoc
|
|
73
|
+
*/
|
|
74
|
+
static override get isOfficialPlugin(): true;
|
|
75
|
+
/**
|
|
76
|
+
* @inheritDoc
|
|
77
|
+
*/
|
|
78
|
+
init(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Adds an action to the list of pending actions.
|
|
81
|
+
*
|
|
82
|
+
* This method returns an action object with an observable message property.
|
|
83
|
+
* The action object can be later used in the {@link #remove} method. It also allows you to change the message.
|
|
84
|
+
*
|
|
85
|
+
* @param message The action message.
|
|
86
|
+
* @returns An observable object that represents a pending action.
|
|
87
|
+
*/
|
|
88
|
+
add(message: string): PendingAction;
|
|
89
|
+
/**
|
|
90
|
+
* Removes an action from the list of pending actions.
|
|
91
|
+
*
|
|
92
|
+
* @param action An action object.
|
|
93
|
+
*/
|
|
94
|
+
remove(action: PendingAction): void;
|
|
95
|
+
/**
|
|
96
|
+
* Returns the first action from the list or null if the list is empty
|
|
97
|
+
*
|
|
98
|
+
* @returns The pending action object.
|
|
99
|
+
*/
|
|
100
|
+
get first(): PendingAction | null;
|
|
101
|
+
/**
|
|
102
|
+
* Iterable interface.
|
|
103
|
+
*/
|
|
104
|
+
[Symbol.iterator](): Iterator<PendingAction>;
|
|
105
105
|
}
|
|
106
106
|
export interface PendingAction extends Observable {
|
|
107
|
-
|
|
107
|
+
message: string;
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
* Fired when an action is added to the list.
|
|
111
|
+
*
|
|
112
|
+
* @eventName ~PendingActions#add
|
|
113
|
+
* @param action The added action.
|
|
114
|
+
*/
|
|
115
115
|
export type PendingActionsAddEvent = CollectionAddEvent<PendingAction>;
|
|
116
116
|
/**
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
* Fired when an action is removed from the list.
|
|
118
|
+
*
|
|
119
|
+
* @eventName ~PendingActions#remove
|
|
120
|
+
* @param action The removed action.
|
|
121
|
+
*/
|
|
122
122
|
export type PendingActionsRemoveEvent = CollectionRemoveEvent<PendingAction>;
|