@ckeditor/ckeditor5-restricted-editing 40.0.0 → 40.2.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.
@@ -1,83 +1,83 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module restricted-editing/restrictededitingmodeediting
7
- */
8
- import { Plugin, type Editor } from 'ckeditor5/src/core';
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
- */
16
- export default 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
- */
35
- constructor(editor: Editor);
36
- /**
37
- * @inheritDoc
38
- */
39
- init(): void;
40
- /**
41
- * Makes the given command always enabled in the restricted editing mode (regardless
42
- * of selection location).
43
- *
44
- * To enable some commands in non-restricted areas of the content use
45
- * {@link module:restricted-editing/restrictededitingconfig~RestrictedEditingConfig#allowedCommands} configuration option.
46
- *
47
- * @param commandName Name of the command to enable.
48
- */
49
- enableCommand(commandName: string): void;
50
- /**
51
- * Sets up the restricted mode editing conversion:
52
- *
53
- * * ucpast & downcast converters,
54
- * * marker highlighting in the edting area,
55
- * * marker post-fixers.
56
- */
57
- private _setupConversion;
58
- /**
59
- * Setups additional editing restrictions beyond command toggling:
60
- *
61
- * * delete content range trimming
62
- * * disabling input command outside exception marker
63
- * * restricting clipboard holder to text only
64
- * * restricting text attributes in content
65
- */
66
- private _setupRestrictions;
67
- /**
68
- * Sets up the command toggling which enables or disables commands based on the user selection.
69
- */
70
- private _setupCommandsToggling;
71
- /**
72
- * Checks if commands should be enabled or disabled based on the current selection.
73
- */
74
- private _checkCommands;
75
- /**
76
- * Enables commands in non-restricted regions.
77
- */
78
- private _enableCommands;
79
- /**
80
- * Disables commands outside non-restricted regions.
81
- */
82
- private _disableCommands;
83
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module restricted-editing/restrictededitingmodeediting
7
+ */
8
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
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
+ */
16
+ export default 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
+ */
35
+ constructor(editor: Editor);
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ init(): void;
40
+ /**
41
+ * Makes the given command always enabled in the restricted editing mode (regardless
42
+ * of selection location).
43
+ *
44
+ * To enable some commands in non-restricted areas of the content use
45
+ * {@link module:restricted-editing/restrictededitingconfig~RestrictedEditingConfig#allowedCommands} configuration option.
46
+ *
47
+ * @param commandName Name of the command to enable.
48
+ */
49
+ enableCommand(commandName: string): void;
50
+ /**
51
+ * Sets up the restricted mode editing conversion:
52
+ *
53
+ * * ucpast & downcast converters,
54
+ * * marker highlighting in the edting area,
55
+ * * marker post-fixers.
56
+ */
57
+ private _setupConversion;
58
+ /**
59
+ * Setups additional editing restrictions beyond command toggling:
60
+ *
61
+ * * delete content range trimming
62
+ * * disabling input command outside exception marker
63
+ * * restricting clipboard holder to text only
64
+ * * restricting text attributes in content
65
+ */
66
+ private _setupRestrictions;
67
+ /**
68
+ * Sets up the command toggling which enables or disables commands based on the user selection.
69
+ */
70
+ private _setupCommandsToggling;
71
+ /**
72
+ * Checks if commands should be enabled or disabled based on the current selection.
73
+ */
74
+ private _checkCommands;
75
+ /**
76
+ * Enables commands in non-restricted regions.
77
+ */
78
+ private _enableCommands;
79
+ /**
80
+ * Disables commands outside non-restricted regions.
81
+ */
82
+ private _disableCommands;
83
+ }