@ckeditor/ckeditor5-restricted-editing 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.
@@ -1,100 +1,100 @@
1
1
  /**
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
- */
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
- * @module restricted-editing/restrictededitingmodeediting
7
- */
8
- import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
6
+ * @module restricted-editing/restrictededitingmodeediting
7
+ */
8
+ import { Plugin, type Editor } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * The restricted editing mode editing feature.
11
- *
12
- * * It introduces the exception marker group that renders to `<span>` elements with the `restricted-editing-exception` CSS class.
13
- * * It registers the `'goToPreviousRestrictedEditingException'` and `'goToNextRestrictedEditingException'` commands.
14
- * * It also enables highlighting exception markers that are selected.
15
- */
10
+ * The restricted editing mode editing feature.
11
+ *
12
+ * * It introduces the exception marker group that renders to `<span>` elements with the `restricted-editing-exception` CSS class.
13
+ * * It registers the `'goToPreviousRestrictedEditingException'` and `'goToNextRestrictedEditingException'` commands.
14
+ * * It also enables highlighting exception markers that are selected.
15
+ */
16
16
  export declare class RestrictedEditingModeEditing extends Plugin {
17
- /**
18
- * Command names that are enabled outside the non-restricted regions.
19
- */
20
- private _alwaysEnabled;
21
- /**
22
- * Commands allowed in non-restricted areas.
23
- *
24
- * Commands always enabled combine typing feature commands: `'input'`, `'insertText'`, `'delete'`, and `'deleteForward'` with
25
- * commands defined in the feature configuration.
26
- */
27
- private _allowedInException;
28
- /**
29
- * @inheritDoc
30
- */
31
- static get pluginName(): "RestrictedEditingModeEditing";
32
- /**
33
- * @inheritDoc
34
- * @internal
35
- */
36
- static get licenseFeatureCode(): string;
37
- /**
38
- * @inheritDoc
39
- */
40
- static get isOfficialPlugin(): true;
41
- /**
42
- * @inheritDoc
43
- */
44
- static get isPremiumPlugin(): true;
45
- /**
46
- * @inheritDoc
47
- */
48
- constructor(editor: Editor);
49
- /**
50
- * @inheritDoc
51
- */
52
- init(): void;
53
- /**
54
- * Makes the given command always enabled in the restricted editing mode (regardless
55
- * of selection location).
56
- *
57
- * To enable some commands in non-restricted areas of the content use
58
- * {@link module:restricted-editing/restrictededitingconfig~RestrictedEditingConfig#allowedCommands} configuration option.
59
- *
60
- * @param commandName Name of the command to enable.
61
- */
62
- enableCommand(commandName: string): void;
63
- /**
64
- * Registers block exception wrapper in the schema.
65
- */
66
- private _setupSchema;
67
- /**
68
- * Sets up the restricted mode editing conversion:
69
- *
70
- * * ucpast & downcast converters,
71
- * * marker highlighting in the edting area,
72
- * * marker post-fixers.
73
- */
74
- private _setupConversion;
75
- /**
76
- * Setups additional editing restrictions beyond command toggling:
77
- *
78
- * * delete content range trimming
79
- * * disabling input command outside exception marker
80
- * * restricting clipboard holder to text only
81
- * * restricting text attributes in content
82
- */
83
- private _setupRestrictions;
84
- /**
85
- * Sets up the command toggling which enables or disables commands based on the user selection.
86
- */
87
- private _setupCommandsToggling;
88
- /**
89
- * Checks if commands should be enabled or disabled based on the current selection.
90
- */
91
- private _checkCommands;
92
- /**
93
- * Enables commands in non-restricted regions.
94
- */
95
- private _enableCommands;
96
- /**
97
- * Disables commands outside non-restricted regions.
98
- */
99
- private _disableCommands;
17
+ /**
18
+ * Command names that are enabled outside the non-restricted regions.
19
+ */
20
+ private _alwaysEnabled;
21
+ /**
22
+ * Commands allowed in non-restricted areas.
23
+ *
24
+ * Commands always enabled combine typing feature commands: `'input'`, `'insertText'`, `'delete'`, and `'deleteForward'` with
25
+ * commands defined in the feature configuration.
26
+ */
27
+ private _allowedInException;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get pluginName(): "RestrictedEditingModeEditing";
32
+ /**
33
+ * @inheritDoc
34
+ * @internal
35
+ */
36
+ static get licenseFeatureCode(): string;
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ static override get isOfficialPlugin(): true;
41
+ /**
42
+ * @inheritDoc
43
+ */
44
+ static override get isPremiumPlugin(): true;
45
+ /**
46
+ * @inheritDoc
47
+ */
48
+ constructor(editor: Editor);
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ init(): void;
53
+ /**
54
+ * Makes the given command always enabled in the restricted editing mode (regardless
55
+ * of selection location).
56
+ *
57
+ * To enable some commands in non-restricted areas of the content use
58
+ * {@link module:restricted-editing/restrictededitingconfig~RestrictedEditingConfig#allowedCommands} configuration option.
59
+ *
60
+ * @param commandName Name of the command to enable.
61
+ */
62
+ enableCommand(commandName: string): void;
63
+ /**
64
+ * Registers block exception wrapper in the schema.
65
+ */
66
+ private _setupSchema;
67
+ /**
68
+ * Sets up the restricted mode editing conversion:
69
+ *
70
+ * * ucpast & downcast converters,
71
+ * * marker highlighting in the edting area,
72
+ * * marker post-fixers.
73
+ */
74
+ private _setupConversion;
75
+ /**
76
+ * Setups additional editing restrictions beyond command toggling:
77
+ *
78
+ * * delete content range trimming
79
+ * * disabling input command outside exception marker
80
+ * * restricting clipboard holder to text only
81
+ * * restricting text attributes in content
82
+ */
83
+ private _setupRestrictions;
84
+ /**
85
+ * Sets up the command toggling which enables or disables commands based on the user selection.
86
+ */
87
+ private _setupCommandsToggling;
88
+ /**
89
+ * Checks if commands should be enabled or disabled based on the current selection.
90
+ */
91
+ private _checkCommands;
92
+ /**
93
+ * Enables commands in non-restricted regions.
94
+ */
95
+ private _enableCommands;
96
+ /**
97
+ * Disables commands outside non-restricted regions.
98
+ */
99
+ private _disableCommands;
100
100
  }
@@ -1,42 +1,42 @@
1
1
  /**
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 { Command, type Editor } from '@ckeditor/ckeditor5-core';
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 { Command, type Editor } from "@ckeditor/ckeditor5-core";
6
6
  /**
7
- * The command that allows navigation across the exceptions in the edited document.
8
- */
7
+ * The command that allows navigation across the exceptions in the edited document.
8
+ */
9
9
  export declare class RestrictedEditingModeNavigationCommand extends Command {
10
- /**
11
- * The direction of the command.
12
- */
13
- private _direction;
14
- /**
15
- * Creates an instance of the command.
16
- *
17
- * @param editor The editor instance.
18
- * @param direction The direction that the command works.
19
- */
20
- constructor(editor: Editor, direction: RestrictedEditingModeNavigationDirection);
21
- /**
22
- * @inheritDoc
23
- */
24
- refresh(): void;
25
- /**
26
- * Executes the command.
27
- *
28
- * @fires execute
29
- */
30
- execute(): void;
31
- /**
32
- * Checks whether the command can be enabled in the current context.
33
- *
34
- * @returns Whether the command should be enabled.
35
- */
36
- private _checkEnabled;
10
+ /**
11
+ * The direction of the command.
12
+ */
13
+ private _direction;
14
+ /**
15
+ * Creates an instance of the command.
16
+ *
17
+ * @param editor The editor instance.
18
+ * @param direction The direction that the command works.
19
+ */
20
+ constructor(editor: Editor, direction: RestrictedEditingModeNavigationDirection);
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ override refresh(): void;
25
+ /**
26
+ * Executes the command.
27
+ *
28
+ * @fires execute
29
+ */
30
+ override execute(): void;
31
+ /**
32
+ * Checks whether the command can be enabled in the current context.
33
+ *
34
+ * @returns Whether the command should be enabled.
35
+ */
36
+ private _checkEnabled;
37
37
  }
38
38
  /**
39
- * Directions in which the
40
- * {@link module:restricted-editing/restrictededitingmodenavigationcommand~RestrictedEditingModeNavigationCommand} can work.
41
- */
42
- export type RestrictedEditingModeNavigationDirection = 'forward' | 'backward';
39
+ * Directions in which the
40
+ * {@link module:restricted-editing/restrictededitingmodenavigationcommand~RestrictedEditingModeNavigationCommand} can work.
41
+ */
42
+ export type RestrictedEditingModeNavigationDirection = "forward" | "backward";
@@ -1,46 +1,46 @@
1
1
  /**
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
- */
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
- * @module restricted-editing/restrictededitingmodeui
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module restricted-editing/restrictededitingmodeui
7
+ */
8
+ import { Plugin } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * The restricted editing mode UI feature.
11
- *
12
- * It introduces the `'restrictedEditing'` dropdown that offers tools to navigate between exceptions across
13
- * the document.
14
- */
10
+ * The restricted editing mode UI feature.
11
+ *
12
+ * It introduces the `'restrictedEditing'` dropdown that offers tools to navigate between exceptions across
13
+ * the document.
14
+ */
15
15
  export declare class RestrictedEditingModeUI extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName(): "RestrictedEditingModeUI";
20
- /**
21
- * @inheritDoc
22
- */
23
- static get isOfficialPlugin(): true;
24
- /**
25
- * @inheritDoc
26
- */
27
- init(): void;
28
- /**
29
- * Creates a button for restricted editing command to use in menu bar.
30
- */
31
- private _createMenuBarButton;
32
- /**
33
- * Returns a definition of the navigation button to be used in the dropdown.
34
- *
35
- * @param commandName The name of the command that the button represents.
36
- * @param label The translated label of the button.
37
- * @param keystroke The button keystroke.
38
- */
39
- private _getButtonDefinition;
40
- /**
41
- * Returns definitions for UI buttons.
42
- *
43
- * @internal
44
- */
45
- private _getButtonDefinitions;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "RestrictedEditingModeUI";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static override get isOfficialPlugin(): true;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ init(): void;
28
+ /**
29
+ * Creates a button for restricted editing command to use in menu bar.
30
+ */
31
+ private _createMenuBarButton;
32
+ /**
33
+ * Returns a definition of the navigation button to be used in the dropdown.
34
+ *
35
+ * @param commandName The name of the command that the button represents.
36
+ * @param label The translated label of the button.
37
+ * @param keystroke The button keystroke.
38
+ */
39
+ private _getButtonDefinition;
40
+ /**
41
+ * Returns definitions for UI buttons.
42
+ *
43
+ * @internal
44
+ */
45
+ private _getButtonDefinitions;
46
46
  }
@@ -1,30 +1,30 @@
1
1
  /**
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
- */
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
- * @module restricted-editing/standardeditingmode
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { StandardEditingModeEditing } from './standardeditingmodeediting.js';
10
- import { StandardEditingModeUI } from './standardeditingmodeui.js';
11
- import '../theme/restrictedediting.css';
6
+ * @module restricted-editing/standardeditingmode
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { StandardEditingModeEditing } from "./standardeditingmodeediting.js";
10
+ import { StandardEditingModeUI } from "./standardeditingmodeui.js";
11
+ import "../theme/restrictedediting.css";
12
12
  /**
13
- * The standard editing mode plugin.
14
- *
15
- * This is a "glue" plugin that loads the following plugins:
16
- *
17
- * * The {@link module:restricted-editing/standardeditingmodeediting~StandardEditingModeEditing standard mode editing feature}.
18
- * * The {@link module:restricted-editing/standardeditingmodeui~StandardEditingModeUI standard mode UI feature}.
19
- */
13
+ * The standard editing mode plugin.
14
+ *
15
+ * This is a "glue" plugin that loads the following plugins:
16
+ *
17
+ * * The {@link module:restricted-editing/standardeditingmodeediting~StandardEditingModeEditing standard mode editing feature}.
18
+ * * The {@link module:restricted-editing/standardeditingmodeui~StandardEditingModeUI standard mode UI feature}.
19
+ */
20
20
  export declare class StandardEditingMode extends Plugin {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get pluginName(): "StandardEditingMode";
25
- /**
26
- * @inheritDoc
27
- */
28
- static get isOfficialPlugin(): true;
29
- static get requires(): readonly [typeof StandardEditingModeEditing, typeof StandardEditingModeUI];
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName(): "StandardEditingMode";
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static override get isOfficialPlugin(): true;
29
+ static get requires(): PluginDependenciesOf<[StandardEditingModeEditing, StandardEditingModeUI]>;
30
30
  }
@@ -1,29 +1,29 @@
1
1
  /**
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
- */
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
- * @module restricted-editing/standardeditingmodeediting
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module restricted-editing/standardeditingmodeediting
7
+ */
8
+ import { Plugin } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * The standard editing mode editing feature.
11
- *
12
- * * It introduces the `restrictedEditingException` text attribute that is rendered as
13
- * a `<span>` element with the `restricted-editing-exception` CSS class.
14
- * * It registers the `'restrictedEditingException'` command.
15
- */
10
+ * The standard editing mode editing feature.
11
+ *
12
+ * * It introduces the `restrictedEditingException` text attribute that is rendered as
13
+ * a `<span>` element with the `restricted-editing-exception` CSS class.
14
+ * * It registers the `'restrictedEditingException'` command.
15
+ */
16
16
  export declare class StandardEditingModeEditing extends Plugin {
17
- /**
18
- * @inheritDoc
19
- */
20
- static get pluginName(): "StandardEditingModeEditing";
21
- /**
22
- * @inheritDoc
23
- */
24
- static get isOfficialPlugin(): true;
25
- /**
26
- * @inheritDoc
27
- */
28
- init(): void;
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get pluginName(): "StandardEditingModeEditing";
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static override get isOfficialPlugin(): true;
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ init(): void;
29
29
  }
@@ -1,31 +1,31 @@
1
1
  /**
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
- */
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
- * @module restricted-editing/standardeditingmodeui
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module restricted-editing/standardeditingmodeui
7
+ */
8
+ import { Plugin } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * The standard editing mode UI feature.
11
- *
12
- * It introduces the `'restrictedEditingException'` button that marks text as unrestricted for editing.
13
- */
10
+ * The standard editing mode UI feature.
11
+ *
12
+ * It introduces the `'restrictedEditingException'` button that marks text as unrestricted for editing.
13
+ */
14
14
  export declare class StandardEditingModeUI extends Plugin {
15
- /**
16
- * @inheritDoc
17
- */
18
- static get pluginName(): "StandardEditingModeUI";
19
- /**
20
- * @inheritDoc
21
- */
22
- static get isOfficialPlugin(): true;
23
- /**
24
- * @inheritDoc
25
- */
26
- init(): void;
27
- /**
28
- * Creates a button for restricted editing exception command to use either in toolbar or in menu bar.
29
- */
30
- private _createButton;
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ static get pluginName(): "StandardEditingModeUI";
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static override get isOfficialPlugin(): true;
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ init(): void;
27
+ /**
28
+ * Creates a button for restricted editing exception command to use either in toolbar or in menu bar.
29
+ */
30
+ private _createButton;
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-restricted-editing",
3
- "version": "48.2.0",
3
+ "version": "48.3.0-alpha.1",
4
4
  "description": "Restricted editing feature for CKEditor 5 editors.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -25,13 +25,13 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@ckeditor/ckeditor5-clipboard": "48.2.0",
29
- "@ckeditor/ckeditor5-core": "48.2.0",
30
- "@ckeditor/ckeditor5-engine": "48.2.0",
31
- "@ckeditor/ckeditor5-icons": "48.2.0",
32
- "@ckeditor/ckeditor5-typing": "48.2.0",
33
- "@ckeditor/ckeditor5-ui": "48.2.0",
34
- "@ckeditor/ckeditor5-utils": "48.2.0"
28
+ "@ckeditor/ckeditor5-clipboard": "48.3.0-alpha.1",
29
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.1",
30
+ "@ckeditor/ckeditor5-engine": "48.3.0-alpha.1",
31
+ "@ckeditor/ckeditor5-icons": "48.3.0-alpha.1",
32
+ "@ckeditor/ckeditor5-typing": "48.3.0-alpha.1",
33
+ "@ckeditor/ckeditor5-ui": "48.3.0-alpha.1",
34
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.1"
35
35
  },
36
36
  "files": [
37
37
  "dist",