@ckeditor/ckeditor5-restricted-editing 36.0.0 → 37.0.0-alpha.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.
@@ -0,0 +1,48 @@
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';
43
+ declare module '@ckeditor/ckeditor5-core' {
44
+ interface CommandsMap {
45
+ goToPreviousRestrictedEditingException: RestrictedEditingModeNavigationCommand;
46
+ goToNextRestrictedEditingException: RestrictedEditingModeNavigationCommand;
47
+ }
48
+ }
@@ -2,119 +2,93 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
- /**
7
- * @module restricted-editing/restrictededitingmodenavigationcommand
8
- */
9
-
10
5
  import { Command } from 'ckeditor5/src/core';
11
-
12
6
  /**
13
7
  * The command that allows navigation across the exceptions in the edited document.
14
- *
15
- * @extends module:core/command~Command
16
8
  */
17
9
  export default class RestrictedEditingModeNavigationCommand extends Command {
18
- /**
19
- * Creates an instance of the command.
20
- *
21
- * @param {module:core/editor/editor~Editor} editor The editor instance.
22
- * @param {String} direction The direction that the command works. Can be either `'forward'` or `'backward'`.
23
- */
24
- constructor( editor, direction ) {
25
- super( editor );
26
-
27
- // It does not affect data so should be enabled in read-only mode and in restricted editing mode.
28
- this.affectsData = false;
29
-
30
- /**
31
- * The direction of the command. Can be `'forward'` or `'backward'`.
32
- *
33
- * @readonly
34
- * @private
35
- * @member {String}
36
- */
37
- this._direction = direction;
38
- }
39
-
40
- /**
41
- * @inheritDoc
42
- */
43
- refresh() {
44
- this.isEnabled = this._checkEnabled();
45
- }
46
-
47
- /**
48
- * Executes the command.
49
- *
50
- * @fires execute
51
- */
52
- execute() {
53
- const position = getNearestExceptionRange( this.editor.model, this._direction );
54
-
55
- this.editor.model.change( writer => {
56
- writer.setSelection( position );
57
- } );
58
- }
59
-
60
- /**
61
- * Checks whether the command can be enabled in the current context.
62
- *
63
- * @private
64
- * @returns {Boolean} Whether the command should be enabled.
65
- */
66
- _checkEnabled() {
67
- return !!getNearestExceptionRange( this.editor.model, this._direction );
68
- }
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
+ }
69
50
  }
70
-
71
- // Returns the range of the exception marker closest to the last position of the
72
- // model selection.
73
- //
74
- // @param {module:engine/model/model~Model} model
75
- // @param {String} direction Either "forward" or "backward".
76
- // @returns {module:engine/model/range~Range|null}
77
- function getNearestExceptionRange( model, direction ) {
78
- const selection = model.document.selection;
79
- const selectionPosition = selection.getFirstPosition();
80
- const markerRanges = [];
81
-
82
- // Get all exception marker positions that start after/before the selection position.
83
- for ( const marker of model.markers.getMarkersGroup( 'restrictedEditingException' ) ) {
84
- const markerRange = marker.getRange();
85
-
86
- // Checking parent because there two positions <paragraph>foo^</paragraph><paragraph>^bar</paragraph>
87
- // are touching but they will represent different markers.
88
- const isMarkerRangeTouching =
89
- selectionPosition.isTouching( markerRange.start ) && selectionPosition.hasSameParentAs( markerRange.start ) ||
90
- selectionPosition.isTouching( markerRange.end ) && selectionPosition.hasSameParentAs( markerRange.end );
91
-
92
- // <paragraph>foo <marker≥b[]ar</marker> baz</paragraph>
93
- // <paragraph>foo <marker≥b[ar</marker> ba]z</paragraph>
94
- // <paragraph>foo <marker≥bar</marker>[] baz</paragraph>
95
- // <paragraph>foo []<marker≥bar</marker> baz</paragraph>
96
- if ( markerRange.containsPosition( selectionPosition ) || isMarkerRangeTouching ) {
97
- continue;
98
- }
99
-
100
- if ( direction === 'forward' && markerRange.start.isAfter( selectionPosition ) ) {
101
- markerRanges.push( markerRange );
102
- } else if ( direction === 'backward' && markerRange.end.isBefore( selectionPosition ) ) {
103
- markerRanges.push( markerRange );
104
- }
105
- }
106
-
107
- if ( !markerRanges.length ) {
108
- return null;
109
- }
110
-
111
- // Get the marker closest to the selection position among many. To know that, we need to sort
112
- // them first.
113
- return markerRanges.sort( ( rangeA, rangeB ) => {
114
- if ( direction === 'forward' ) {
115
- return rangeA.start.isAfter( rangeB.start ) ? 1 : -1;
116
- } else {
117
- return rangeA.start.isBefore( rangeB.start ) ? 1 : -1;
118
- }
119
- } ).shift();
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();
120
94
  }
@@ -0,0 +1,37 @@
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
+ }
33
+ declare module '@ckeditor/ckeditor5-core' {
34
+ interface PluginsMap {
35
+ [RestrictedEditingModeUI.pluginName]: RestrictedEditingModeUI;
36
+ }
37
+ }
@@ -2,99 +2,74 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module restricted-editing/restrictededitingmodeui
8
7
  */
9
-
10
8
  import { Plugin } from 'ckeditor5/src/core';
11
9
  import { Model, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';
12
10
  import { Collection } from 'ckeditor5/src/utils';
13
-
14
11
  import lockIcon from '../theme/icons/contentlock.svg';
15
-
16
12
  /**
17
13
  * The restricted editing mode UI feature.
18
14
  *
19
15
  * It introduces the `'restrictedEditing'` dropdown that offers tools to navigate between exceptions across
20
16
  * the document.
21
- *
22
- * @extends module:core/plugin~Plugin
23
17
  */
24
18
  export default class RestrictedEditingModeUI extends Plugin {
25
- /**
26
- * @inheritDoc
27
- */
28
- static get pluginName() {
29
- return 'RestrictedEditingModeUI';
30
- }
31
-
32
- /**
33
- * @inheritDoc
34
- */
35
- init() {
36
- const editor = this.editor;
37
- const t = editor.t;
38
-
39
- editor.ui.componentFactory.add( 'restrictedEditing', locale => {
40
- const dropdownView = createDropdown( locale );
41
- const listItems = new Collection();
42
-
43
- listItems.add( this._getButtonDefinition(
44
- 'goToPreviousRestrictedEditingException',
45
- t( 'Previous editable region' ),
46
- 'Shift+Tab'
47
- ) );
48
- listItems.add( this._getButtonDefinition(
49
- 'goToNextRestrictedEditingException',
50
- t( 'Next editable region' ),
51
- 'Tab'
52
- ) );
53
-
54
- addListToDropdown( dropdownView, listItems );
55
-
56
- dropdownView.buttonView.set( {
57
- label: t( 'Navigate editable regions' ),
58
- icon: lockIcon,
59
- tooltip: true,
60
- isEnabled: true,
61
- isOn: false
62
- } );
63
-
64
- this.listenTo( dropdownView, 'execute', evt => {
65
- editor.execute( evt.source._commandName );
66
- editor.editing.view.focus();
67
- } );
68
-
69
- return dropdownView;
70
- } );
71
- }
72
-
73
- /**
74
- * Returns a definition of the navigation button to be used in the dropdown.
75
- *
76
- * @private
77
- * @param {String} commandName The name of the command that the button represents.
78
- * @param {String} label The translated label of the button.
79
- * @param {String} keystroke The button keystroke.
80
- * @returns {module:ui/dropdown/utils~ListDropdownItemDefinition}
81
- */
82
- _getButtonDefinition( commandName, label, keystroke ) {
83
- const editor = this.editor;
84
- const command = editor.commands.get( commandName );
85
- const definition = {
86
- type: 'button',
87
- model: new Model( {
88
- label,
89
- withText: true,
90
- keystroke,
91
- withKeystroke: true,
92
- _commandName: commandName
93
- } )
94
- };
95
-
96
- definition.model.bind( 'isEnabled' ).to( command, 'isEnabled' );
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.
97
54
 
98
- return definition;
99
- }
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
+ }
100
75
  }
@@ -0,0 +1,29 @@
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, type PluginDependencies } from 'ckeditor5/src/core';
9
+ import '../theme/restrictedediting.css';
10
+ /**
11
+ * The standard editing mode plugin.
12
+ *
13
+ * This is a "glue" plugin that loads the following plugins:
14
+ *
15
+ * * The {@link module:restricted-editing/standardeditingmodeediting~StandardEditingModeEditing standard mode editing feature}.
16
+ * * The {@link module:restricted-editing/standardeditingmodeui~StandardEditingModeUI standard mode UI feature}.
17
+ */
18
+ export default class StandardEditingMode extends Plugin {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): 'StandardEditingMode';
23
+ static get requires(): PluginDependencies;
24
+ }
25
+ declare module '@ckeditor/ckeditor5-core' {
26
+ interface PluginsMap {
27
+ [StandardEditingMode.pluginName]: StandardEditingMode;
28
+ }
29
+ }
@@ -2,18 +2,13 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module restricted-editing/standardeditingmode
8
7
  */
9
-
10
8
  import { Plugin } from 'ckeditor5/src/core';
11
-
12
9
  import StandardEditingModeEditing from './standardeditingmodeediting';
13
10
  import StandardEditingModeUI from './standardeditingmodeui';
14
-
15
11
  import '../theme/restrictedediting.css';
16
-
17
12
  /**
18
13
  * The standard editing mode plugin.
19
14
  *
@@ -21,18 +16,15 @@ import '../theme/restrictedediting.css';
21
16
  *
22
17
  * * The {@link module:restricted-editing/standardeditingmodeediting~StandardEditingModeEditing standard mode editing feature}.
23
18
  * * The {@link module:restricted-editing/standardeditingmodeui~StandardEditingModeUI standard mode UI feature}.
24
- *
25
- * @extends module:core/plugin~Plugin
26
19
  */
27
20
  export default class StandardEditingMode extends Plugin {
28
- /**
29
- * @inheritDoc
30
- */
31
- static get pluginName() {
32
- return 'StandardEditingMode';
33
- }
34
-
35
- static get requires() {
36
- return [ StandardEditingModeEditing, StandardEditingModeUI ];
37
- }
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName() {
25
+ return 'StandardEditingMode';
26
+ }
27
+ static get requires() {
28
+ return [StandardEditingModeEditing, StandardEditingModeUI];
29
+ }
38
30
  }
@@ -0,0 +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/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
+ }
26
+ declare module '@ckeditor/ckeditor5-core' {
27
+ interface PluginsMap {
28
+ [StandardEditingModeEditing.pluginName]: StandardEditingModeEditing;
29
+ }
30
+ }
@@ -2,64 +2,52 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module restricted-editing/standardeditingmodeediting
8
7
  */
9
-
10
8
  import { Plugin } from 'ckeditor5/src/core';
11
-
12
9
  import RestrictedEditingExceptionCommand from './restrictededitingexceptioncommand';
13
-
14
10
  /**
15
11
  * The standard editing mode editing feature.
16
12
  *
17
13
  * * It introduces the `restrictedEditingException` text attribute that is rendered as
18
14
  * a `<span>` element with the `restricted-editing-exception` CSS class.
19
15
  * * It registers the `'restrictedEditingException'` command.
20
- *
21
- * @extends module:core/plugin~Plugin
22
16
  */
23
17
  export default class StandardEditingModeEditing extends Plugin {
24
- /**
25
- * @inheritDoc
26
- */
27
- static get pluginName() {
28
- return 'StandardEditingModeEditing';
29
- }
30
-
31
- /**
32
- * @inheritDoc
33
- */
34
- init() {
35
- const editor = this.editor;
36
-
37
- editor.model.schema.extend( '$text', { allowAttributes: [ 'restrictedEditingException' ] } );
38
-
39
- editor.conversion.for( 'upcast' ).elementToAttribute( {
40
- model: 'restrictedEditingException',
41
- view: {
42
- name: 'span',
43
- classes: 'restricted-editing-exception'
44
- }
45
- } );
46
-
47
- editor.conversion.for( 'downcast' ).attributeToElement( {
48
- model: 'restrictedEditingException',
49
- view: ( modelAttributeValue, { writer } ) => {
50
- if ( modelAttributeValue ) {
51
- // Make the restricted editing <span> outer-most in the view.
52
- return writer.createAttributeElement( 'span', { class: 'restricted-editing-exception' }, { priority: -10 } );
53
- }
54
- }
55
- } );
56
-
57
- editor.commands.add( 'restrictedEditingException', new RestrictedEditingExceptionCommand( editor ) );
58
-
59
- editor.editing.view.change( writer => {
60
- for ( const root of editor.editing.view.document.roots ) {
61
- writer.addClass( 'ck-restricted-editing_mode_standard', root );
62
- }
63
- } );
64
- }
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName() {
22
+ return 'StandardEditingModeEditing';
23
+ }
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ init() {
28
+ const editor = this.editor;
29
+ editor.model.schema.extend('$text', { allowAttributes: ['restrictedEditingException'] });
30
+ editor.conversion.for('upcast').elementToAttribute({
31
+ model: 'restrictedEditingException',
32
+ view: {
33
+ name: 'span',
34
+ classes: 'restricted-editing-exception'
35
+ }
36
+ });
37
+ editor.conversion.for('downcast').attributeToElement({
38
+ model: 'restrictedEditingException',
39
+ view: (modelAttributeValue, { writer }) => {
40
+ if (modelAttributeValue) {
41
+ // Make the restricted editing <span> outer-most in the view.
42
+ return writer.createAttributeElement('span', { class: 'restricted-editing-exception' }, { priority: -10 });
43
+ }
44
+ }
45
+ });
46
+ editor.commands.add('restrictedEditingException', new RestrictedEditingExceptionCommand(editor));
47
+ editor.editing.view.change(writer => {
48
+ for (const root of editor.editing.view.document.roots) {
49
+ writer.addClass('ck-restricted-editing_mode_standard', root);
50
+ }
51
+ });
52
+ }
65
53
  }