@ckeditor/ckeditor5-restricted-editing 39.0.1 → 40.0.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.
Files changed (83) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +3 -3
  3. package/build/restricted-editing.js.map +1 -0
  4. package/build/translations/pt-br.js +1 -1
  5. package/lang/translations/ar.po +1 -0
  6. package/lang/translations/az.po +1 -0
  7. package/lang/translations/bg.po +1 -0
  8. package/lang/translations/bn.po +1 -0
  9. package/lang/translations/ca.po +1 -0
  10. package/lang/translations/cs.po +1 -0
  11. package/lang/translations/da.po +1 -0
  12. package/lang/translations/de-ch.po +1 -0
  13. package/lang/translations/de.po +1 -0
  14. package/lang/translations/el.po +1 -0
  15. package/lang/translations/en-au.po +1 -0
  16. package/lang/translations/en-gb.po +1 -0
  17. package/lang/translations/en.po +1 -0
  18. package/lang/translations/es.po +1 -0
  19. package/lang/translations/et.po +1 -0
  20. package/lang/translations/fa.po +1 -0
  21. package/lang/translations/fi.po +1 -0
  22. package/lang/translations/fr.po +1 -0
  23. package/lang/translations/gl.po +1 -0
  24. package/lang/translations/he.po +1 -0
  25. package/lang/translations/hi.po +1 -0
  26. package/lang/translations/hr.po +1 -0
  27. package/lang/translations/hu.po +1 -0
  28. package/lang/translations/id.po +1 -0
  29. package/lang/translations/it.po +1 -0
  30. package/lang/translations/ja.po +1 -0
  31. package/lang/translations/ko.po +1 -0
  32. package/lang/translations/ku.po +1 -0
  33. package/lang/translations/lt.po +1 -0
  34. package/lang/translations/lv.po +1 -0
  35. package/lang/translations/ms.po +1 -0
  36. package/lang/translations/nl.po +1 -0
  37. package/lang/translations/no.po +1 -0
  38. package/lang/translations/pl.po +1 -0
  39. package/lang/translations/pt-br.po +6 -5
  40. package/lang/translations/pt.po +1 -0
  41. package/lang/translations/ro.po +1 -0
  42. package/lang/translations/ru.po +1 -0
  43. package/lang/translations/sk.po +1 -0
  44. package/lang/translations/sq.po +1 -0
  45. package/lang/translations/sr-latn.po +1 -0
  46. package/lang/translations/sr.po +1 -0
  47. package/lang/translations/sv.po +1 -0
  48. package/lang/translations/th.po +1 -0
  49. package/lang/translations/tk.po +1 -0
  50. package/lang/translations/tr.po +1 -0
  51. package/lang/translations/uk.po +1 -0
  52. package/lang/translations/ur.po +1 -0
  53. package/lang/translations/uz.po +1 -0
  54. package/lang/translations/vi.po +1 -0
  55. package/lang/translations/zh-cn.po +1 -0
  56. package/lang/translations/zh.po +1 -0
  57. package/package.json +2 -6
  58. package/src/augmentation.d.ts +29 -29
  59. package/src/augmentation.js +5 -5
  60. package/src/index.d.ts +17 -17
  61. package/src/index.js +14 -14
  62. package/src/restrictededitingconfig.d.ts +60 -60
  63. package/src/restrictededitingconfig.js +5 -5
  64. package/src/restrictededitingexceptioncommand.d.ts +30 -30
  65. package/src/restrictededitingexceptioncommand.js +61 -61
  66. package/src/restrictededitingmode/converters.d.ts +39 -39
  67. package/src/restrictededitingmode/converters.js +142 -142
  68. package/src/restrictededitingmode/utils.d.ts +30 -30
  69. package/src/restrictededitingmode/utils.js +50 -50
  70. package/src/restrictededitingmode.d.ts +29 -29
  71. package/src/restrictededitingmode.js +33 -33
  72. package/src/restrictededitingmodeediting.d.ts +83 -83
  73. package/src/restrictededitingmodeediting.js +391 -391
  74. package/src/restrictededitingmodenavigationcommand.d.ts +42 -42
  75. package/src/restrictededitingmodenavigationcommand.js +94 -94
  76. package/src/restrictededitingmodeui.d.ts +32 -32
  77. package/src/restrictededitingmodeui.js +75 -75
  78. package/src/standardeditingmode.d.ts +26 -26
  79. package/src/standardeditingmode.js +30 -30
  80. package/src/standardeditingmodeediting.d.ts +25 -25
  81. package/src/standardeditingmodeediting.js +53 -53
  82. package/src/standardeditingmodeui.d.ts +23 -23
  83. package/src/standardeditingmodeui.js +48 -48
@@ -1,42 +1,42 @@
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
- import { Command, type Editor } from 'ckeditor5/src/core';
6
- /**
7
- * The command that allows navigation across the exceptions in the edited document.
8
- */
9
- export default 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;
37
- }
38
- /**
39
- * Directions in which the
40
- * {@link module:restricted-editing/restrictededitingmodenavigationcommand~RestrictedEditingModeNavigationCommand} can work.
41
- */
42
- export type RestrictedEditingModeNavigationDirection = 'forward' | 'backward';
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
+ import { Command, type Editor } from 'ckeditor5/src/core';
6
+ /**
7
+ * The command that allows navigation across the exceptions in the edited document.
8
+ */
9
+ export default 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;
37
+ }
38
+ /**
39
+ * Directions in which the
40
+ * {@link module:restricted-editing/restrictededitingmodenavigationcommand~RestrictedEditingModeNavigationCommand} can work.
41
+ */
42
+ export type RestrictedEditingModeNavigationDirection = 'forward' | 'backward';
@@ -1,94 +1,94 @@
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
- import { Command } from 'ckeditor5/src/core';
6
- /**
7
- * The command that allows navigation across the exceptions in the edited document.
8
- */
9
- export default class RestrictedEditingModeNavigationCommand extends Command {
10
- /**
11
- * Creates an instance of the command.
12
- *
13
- * @param editor The editor instance.
14
- * @param direction The direction that the command works.
15
- */
16
- constructor(editor, direction) {
17
- super(editor);
18
- // It does not affect data so should be enabled in read-only mode and in restricted editing mode.
19
- this.affectsData = false;
20
- this._direction = direction;
21
- }
22
- /**
23
- * @inheritDoc
24
- */
25
- refresh() {
26
- this.isEnabled = this._checkEnabled();
27
- }
28
- /**
29
- * Executes the command.
30
- *
31
- * @fires execute
32
- */
33
- execute() {
34
- const position = getNearestExceptionRange(this.editor.model, this._direction);
35
- if (!position) {
36
- return;
37
- }
38
- this.editor.model.change(writer => {
39
- writer.setSelection(position);
40
- });
41
- }
42
- /**
43
- * Checks whether the command can be enabled in the current context.
44
- *
45
- * @returns Whether the command should be enabled.
46
- */
47
- _checkEnabled() {
48
- return !!getNearestExceptionRange(this.editor.model, this._direction);
49
- }
50
- }
51
- /**
52
- * Returns the range of the exception marker closest to the last position of the model selection.
53
- */
54
- function getNearestExceptionRange(model, direction) {
55
- const selection = model.document.selection;
56
- const selectionPosition = selection.getFirstPosition();
57
- const markerRanges = [];
58
- // Get all exception marker positions that start after/before the selection position.
59
- for (const marker of model.markers.getMarkersGroup('restrictedEditingException')) {
60
- const markerRange = marker.getRange();
61
- // Checking parent because there two positions <paragraph>foo^</paragraph><paragraph>^bar</paragraph>
62
- // are touching but they will represent different markers.
63
- const isMarkerRangeTouching = selectionPosition.isTouching(markerRange.start) && selectionPosition.hasSameParentAs(markerRange.start) ||
64
- selectionPosition.isTouching(markerRange.end) && selectionPosition.hasSameParentAs(markerRange.end);
65
- // <paragraph>foo <marker≥b[]ar</marker> baz</paragraph>
66
- // <paragraph>foo <marker≥b[ar</marker> ba]z</paragraph>
67
- // <paragraph>foo <marker≥bar</marker>[] baz</paragraph>
68
- // <paragraph>foo []<marker≥bar</marker> baz</paragraph>
69
- if (markerRange.containsPosition(selectionPosition) || isMarkerRangeTouching) {
70
- continue;
71
- }
72
- if (direction === 'forward' && markerRange.start.isAfter(selectionPosition)) {
73
- markerRanges.push(markerRange);
74
- }
75
- else if (direction === 'backward' && markerRange.end.isBefore(selectionPosition)) {
76
- markerRanges.push(markerRange);
77
- }
78
- }
79
- if (!markerRanges.length) {
80
- return;
81
- }
82
- // Get the marker closest to the selection position among many. To know that, we need to sort
83
- // them first.
84
- return markerRanges
85
- .sort((rangeA, rangeB) => {
86
- if (direction === 'forward') {
87
- return rangeA.start.isAfter(rangeB.start) ? 1 : -1;
88
- }
89
- else {
90
- return rangeA.start.isBefore(rangeB.start) ? 1 : -1;
91
- }
92
- })
93
- .shift();
94
- }
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
+ import { Command } from 'ckeditor5/src/core';
6
+ /**
7
+ * The command that allows navigation across the exceptions in the edited document.
8
+ */
9
+ export default class RestrictedEditingModeNavigationCommand extends Command {
10
+ /**
11
+ * Creates an instance of the command.
12
+ *
13
+ * @param editor The editor instance.
14
+ * @param direction The direction that the command works.
15
+ */
16
+ constructor(editor, direction) {
17
+ super(editor);
18
+ // It does not affect data so should be enabled in read-only mode and in restricted editing mode.
19
+ this.affectsData = false;
20
+ this._direction = direction;
21
+ }
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ refresh() {
26
+ this.isEnabled = this._checkEnabled();
27
+ }
28
+ /**
29
+ * Executes the command.
30
+ *
31
+ * @fires execute
32
+ */
33
+ execute() {
34
+ const position = getNearestExceptionRange(this.editor.model, this._direction);
35
+ if (!position) {
36
+ return;
37
+ }
38
+ this.editor.model.change(writer => {
39
+ writer.setSelection(position);
40
+ });
41
+ }
42
+ /**
43
+ * Checks whether the command can be enabled in the current context.
44
+ *
45
+ * @returns Whether the command should be enabled.
46
+ */
47
+ _checkEnabled() {
48
+ return !!getNearestExceptionRange(this.editor.model, this._direction);
49
+ }
50
+ }
51
+ /**
52
+ * Returns the range of the exception marker closest to the last position of the model selection.
53
+ */
54
+ function getNearestExceptionRange(model, direction) {
55
+ const selection = model.document.selection;
56
+ const selectionPosition = selection.getFirstPosition();
57
+ const markerRanges = [];
58
+ // Get all exception marker positions that start after/before the selection position.
59
+ for (const marker of model.markers.getMarkersGroup('restrictedEditingException')) {
60
+ const markerRange = marker.getRange();
61
+ // Checking parent because there two positions <paragraph>foo^</paragraph><paragraph>^bar</paragraph>
62
+ // are touching but they will represent different markers.
63
+ const isMarkerRangeTouching = selectionPosition.isTouching(markerRange.start) && selectionPosition.hasSameParentAs(markerRange.start) ||
64
+ selectionPosition.isTouching(markerRange.end) && selectionPosition.hasSameParentAs(markerRange.end);
65
+ // <paragraph>foo <marker≥b[]ar</marker> baz</paragraph>
66
+ // <paragraph>foo <marker≥b[ar</marker> ba]z</paragraph>
67
+ // <paragraph>foo <marker≥bar</marker>[] baz</paragraph>
68
+ // <paragraph>foo []<marker≥bar</marker> baz</paragraph>
69
+ if (markerRange.containsPosition(selectionPosition) || isMarkerRangeTouching) {
70
+ continue;
71
+ }
72
+ if (direction === 'forward' && markerRange.start.isAfter(selectionPosition)) {
73
+ markerRanges.push(markerRange);
74
+ }
75
+ else if (direction === 'backward' && markerRange.end.isBefore(selectionPosition)) {
76
+ markerRanges.push(markerRange);
77
+ }
78
+ }
79
+ if (!markerRanges.length) {
80
+ return;
81
+ }
82
+ // Get the marker closest to the selection position among many. To know that, we need to sort
83
+ // them first.
84
+ return markerRanges
85
+ .sort((rangeA, rangeB) => {
86
+ if (direction === 'forward') {
87
+ return rangeA.start.isAfter(rangeB.start) ? 1 : -1;
88
+ }
89
+ else {
90
+ return rangeA.start.isBefore(rangeB.start) ? 1 : -1;
91
+ }
92
+ })
93
+ .shift();
94
+ }
@@ -1,32 +1,32 @@
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/restrictededitingmodeui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
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
- */
15
- export default class RestrictedEditingModeUI extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName(): "RestrictedEditingModeUI";
20
- /**
21
- * @inheritDoc
22
- */
23
- init(): void;
24
- /**
25
- * Returns a definition of the navigation button to be used in the dropdown.
26
-
27
- * @param commandName The name of the command that the button represents.
28
- * @param label The translated label of the button.
29
- * @param keystroke The button keystroke.
30
- */
31
- private _getButtonDefinition;
32
- }
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/restrictededitingmodeui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
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
+ */
15
+ export default class RestrictedEditingModeUI extends Plugin {
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "RestrictedEditingModeUI";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ init(): void;
24
+ /**
25
+ * Returns a definition of the navigation button to be used in the dropdown.
26
+
27
+ * @param commandName The name of the command that the button represents.
28
+ * @param label The translated label of the button.
29
+ * @param keystroke The button keystroke.
30
+ */
31
+ private _getButtonDefinition;
32
+ }
@@ -1,75 +1,75 @@
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/restrictededitingmodeui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';
10
- import { Collection } from 'ckeditor5/src/utils';
11
- import lockIcon from '../theme/icons/contentlock.svg';
12
- /**
13
- * The restricted editing mode UI feature.
14
- *
15
- * It introduces the `'restrictedEditing'` dropdown that offers tools to navigate between exceptions across
16
- * the document.
17
- */
18
- export default class RestrictedEditingModeUI extends Plugin {
19
- /**
20
- * @inheritDoc
21
- */
22
- static get pluginName() {
23
- return 'RestrictedEditingModeUI';
24
- }
25
- /**
26
- * @inheritDoc
27
- */
28
- init() {
29
- const editor = this.editor;
30
- const t = editor.t;
31
- editor.ui.componentFactory.add('restrictedEditing', locale => {
32
- const dropdownView = createDropdown(locale);
33
- const listItems = new Collection();
34
- listItems.add(this._getButtonDefinition('goToPreviousRestrictedEditingException', t('Previous editable region'), 'Shift+Tab'));
35
- listItems.add(this._getButtonDefinition('goToNextRestrictedEditingException', t('Next editable region'), 'Tab'));
36
- addListToDropdown(dropdownView, listItems);
37
- dropdownView.buttonView.set({
38
- label: t('Navigate editable regions'),
39
- icon: lockIcon,
40
- tooltip: true,
41
- isEnabled: true,
42
- isOn: false
43
- });
44
- this.listenTo(dropdownView, 'execute', evt => {
45
- const { _commandName } = evt.source;
46
- editor.execute(_commandName);
47
- editor.editing.view.focus();
48
- });
49
- return dropdownView;
50
- });
51
- }
52
- /**
53
- * Returns a definition of the navigation button to be used in the dropdown.
54
-
55
- * @param commandName The name of the command that the button represents.
56
- * @param label The translated label of the button.
57
- * @param keystroke The button keystroke.
58
- */
59
- _getButtonDefinition(commandName, label, keystroke) {
60
- const editor = this.editor;
61
- const command = editor.commands.get(commandName);
62
- const definition = {
63
- type: 'button',
64
- model: new Model({
65
- label,
66
- withText: true,
67
- keystroke,
68
- withKeystroke: true,
69
- _commandName: commandName
70
- })
71
- };
72
- definition.model.bind('isEnabled').to(command, 'isEnabled');
73
- return definition;
74
- }
75
- }
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/restrictededitingmodeui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import { Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';
10
+ import { Collection } from 'ckeditor5/src/utils';
11
+ import lockIcon from '../theme/icons/contentlock.svg';
12
+ /**
13
+ * The restricted editing mode UI feature.
14
+ *
15
+ * It introduces the `'restrictedEditing'` dropdown that offers tools to navigate between exceptions across
16
+ * the document.
17
+ */
18
+ export default class RestrictedEditingModeUI extends Plugin {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName() {
23
+ return 'RestrictedEditingModeUI';
24
+ }
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ init() {
29
+ const editor = this.editor;
30
+ const t = editor.t;
31
+ editor.ui.componentFactory.add('restrictedEditing', locale => {
32
+ const dropdownView = createDropdown(locale);
33
+ const listItems = new Collection();
34
+ listItems.add(this._getButtonDefinition('goToPreviousRestrictedEditingException', t('Previous editable region'), 'Shift+Tab'));
35
+ listItems.add(this._getButtonDefinition('goToNextRestrictedEditingException', t('Next editable region'), 'Tab'));
36
+ addListToDropdown(dropdownView, listItems);
37
+ dropdownView.buttonView.set({
38
+ label: t('Navigate editable regions'),
39
+ icon: lockIcon,
40
+ tooltip: true,
41
+ isEnabled: true,
42
+ isOn: false
43
+ });
44
+ this.listenTo(dropdownView, 'execute', evt => {
45
+ const { _commandName } = evt.source;
46
+ editor.execute(_commandName);
47
+ editor.editing.view.focus();
48
+ });
49
+ return dropdownView;
50
+ });
51
+ }
52
+ /**
53
+ * Returns a definition of the navigation button to be used in the dropdown.
54
+
55
+ * @param commandName The name of the command that the button represents.
56
+ * @param label The translated label of the button.
57
+ * @param keystroke The button keystroke.
58
+ */
59
+ _getButtonDefinition(commandName, label, keystroke) {
60
+ const editor = this.editor;
61
+ const command = editor.commands.get(commandName);
62
+ const definition = {
63
+ type: 'button',
64
+ model: new Model({
65
+ label,
66
+ withText: true,
67
+ keystroke,
68
+ withKeystroke: true,
69
+ _commandName: commandName
70
+ })
71
+ };
72
+ definition.model.bind('isEnabled').to(command, 'isEnabled');
73
+ return definition;
74
+ }
75
+ }
@@ -1,26 +1,26 @@
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/standardeditingmode
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import StandardEditingModeEditing from './standardeditingmodeediting';
10
- import StandardEditingModeUI from './standardeditingmodeui';
11
- import '../theme/restrictedediting.css';
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
- */
20
- export default class StandardEditingMode extends Plugin {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get pluginName(): "StandardEditingMode";
25
- static get requires(): readonly [typeof StandardEditingModeEditing, typeof StandardEditingModeUI];
26
- }
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/standardeditingmode
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import StandardEditingModeEditing from './standardeditingmodeediting';
10
+ import StandardEditingModeUI from './standardeditingmodeui';
11
+ import '../theme/restrictedediting.css';
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
+ */
20
+ export default class StandardEditingMode extends Plugin {
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName(): "StandardEditingMode";
25
+ static get requires(): readonly [typeof StandardEditingModeEditing, typeof StandardEditingModeUI];
26
+ }
@@ -1,30 +1,30 @@
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/standardeditingmode
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import StandardEditingModeEditing from './standardeditingmodeediting';
10
- import StandardEditingModeUI from './standardeditingmodeui';
11
- import '../theme/restrictedediting.css';
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
- */
20
- export default class StandardEditingMode extends Plugin {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get pluginName() {
25
- return 'StandardEditingMode';
26
- }
27
- static get requires() {
28
- return [StandardEditingModeEditing, StandardEditingModeUI];
29
- }
30
- }
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/standardeditingmode
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import StandardEditingModeEditing from './standardeditingmodeediting';
10
+ import StandardEditingModeUI from './standardeditingmodeui';
11
+ import '../theme/restrictedediting.css';
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
+ */
20
+ export default class StandardEditingMode extends Plugin {
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName() {
25
+ return 'StandardEditingMode';
26
+ }
27
+ static get requires() {
28
+ return [StandardEditingModeEditing, StandardEditingModeUI];
29
+ }
30
+ }
@@ -1,25 +1,25 @@
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/standardeditingmodeediting
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
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
- */
16
- export default class StandardEditingModeEditing extends Plugin {
17
- /**
18
- * @inheritDoc
19
- */
20
- static get pluginName(): "StandardEditingModeEditing";
21
- /**
22
- * @inheritDoc
23
- */
24
- init(): void;
25
- }
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/standardeditingmodeediting
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
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
+ */
16
+ export default class StandardEditingModeEditing extends Plugin {
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get pluginName(): "StandardEditingModeEditing";
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ init(): void;
25
+ }