瀏覽代碼

Merge branch 'master' into i/5840

# Conflicts:
#	tests/manual/restrictedediting.html
Maciej Gołaszewski 6 年之前
父節點
當前提交
9365d55fc4

+ 6 - 0
packages/ckeditor5-restricted-editing/CHANGELOG.md

@@ -0,0 +1,6 @@
+Changelog
+=========
+
+## [16.0.0](https://github.com/ckeditor/ckeditor5-restricted-editing/tree/v16.0.0) (2019-12-04)
+
+The initial release.

+ 9 - 23
packages/ckeditor5-restricted-editing/docs/_snippets/features/restricted-editing.html

@@ -5,27 +5,13 @@
 </p>
 
 <div id="restricted-editing-editor">
-	<h2>Heading 1</h2>
-	<p>Paragraph <span class="ck-restricted-editing-exception">it is editable</span></p>
-	<p><strong>Bold</strong> <i>Italic</i> <a href="https://ckeditor.com">Link</a></p>
-	<ul>
-		<li>UL List item 1</li>
-		<li>UL List item 2</li>
-	</ul>
-	<ol>
-		<li><span class="ck-restricted-editing-exception">OL List item 1</span></li>
-		<li>OL List item 2</li>
-	</ol>
-	<figure class="image image-style-side">
-		<img alt="bar" src="%BASE_PATH%/assets/img/fields.jpg">
-		<figcaption>Caption</figcaption>
-	</figure>
-	<blockquote>
-		<p>Quote</p>
-		<ul>
-			<li>Quoted UL List item 1</li>
-			<li>Quoted UL List item <span class="ck-restricted-editing-exception">2</span></li>
-		</ul>
-		<p>Quote</p>
-	</blockquote>
+	<p>Dear&nbsp;<span class="restricted-editing-exception">Customer Name</span>,</p>
+
+	<p>thank you for contacting us.&nbsp;Your case was logged as&nbsp;<span class="restricted-editing-exception">Case ID</span>&nbsp;and is assigned to&nbsp;<span class="restricted-editing-exception">Technician Name</span>. We will attempt to resolve your issue within the next&nbsp;<span class="restricted-editing-exception">Time</span>&nbsp;hours.</p>
+
+	<p>Should you need any further assistance, do not hesitate to contact our Customer Support Hotline at <span class="restricted-editing-exception">Hotline Number</span>.</p>
+
+	<p>Yours sincerely,<br />
+	<span class="restricted-editing-exception">Name</span><br />
+	Customer Support Team</p>
 </div>

+ 32 - 12
packages/ckeditor5-restricted-editing/docs/features/restricted-editing.md

@@ -4,19 +4,26 @@ menu-title: Restricted editing
 category: features
 ---
 
-The restricted editing feature allows to define editable areas in a documents that have restricted editing options. This feature defines
-two modes for the editor:
+The restricted editing feature allows you to define which parts of a document should be editable for a group of users who should have a more restricted editing rights.
 
-1. Standard editing mode
-2. Restricted editing mode
+In order to do that, this feature introduces two editing modes:
 
-The standard editing mode is used as normal editor instance to create content. It also allows to mark regions of the document as non-restricted areas.
+* **Standard editing mode** &mdash; in this mode the user can freely edit the content and choose regions which should be editable in the second mode &mdash; the restricted mode.
+* **Restricted editing mode** &mdash; when the editor is initialized in this mode the user can only edit the content within the regions chosen by the user in the previous mode.
 
-The restricted editing mode allows other set of users to fill those non-restricted areas with text. You can additionally define which of editor commands are allowed inside non-restricted areas. The restricted editing mode expects that allowed commands are a text-formatting commands, like `'bold'`, `'italic'` or `'fontColor'`.
+You can imagine a workflow in which a certain group of users is responsible for creating templates of documents while a second group of users can only fill the gaps (for example, fill missing data, like names, dates, product names, etc.).
+
+By using this feature users of your application will be able to create template documents. In a certain way, this feature could be used to generate forms with rich-text capabilities.
 
 ## Demo
 
-The demo below works in two modes: "Standard Editing Mode" and "Restricted Editing Mode". Using the radio buttons below you can switch between modes.
+The demo below allows you to emulate both modes. You can first create a template of the document in the standard editing mode.
+
+Then you can switch to the restricted editing mode to see how the editable regions and non-editable regions behaves.
+
+<info-box>
+	Tip: Use <kbd>Tab</kbd> to navigate from one editable region to another (and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move back) in the restricted mode.
+</info-box>
 
 {@snippet features/restricted-editing}
 
@@ -28,9 +35,9 @@ To add this feature to your rich-text editor, install the [`@ckeditor/ckeditor5-
 npm install --save @ckeditor/ckeditor5-restricted-editing
 ```
 
-### Running the Standard Editing Mode
+### Running the standard editing mode
 
-And add it to your plugin list and the toolbar configuration:
+In order to initialize the editor in the standard editing mode add the {@link module:restricted-editing/standardeditingmode~StandardEditingMode} plugin and add the `'restrictedEditingException'` button to the toolbar:
 
 ```js
 import StandardEditingMode from '@ckeditor/ckeditor5-restricted-editing/src/standardeditingmode';
@@ -44,9 +51,9 @@ ClassicEditor
 	.catch( ... );
 ```
 
-### Running the Restricted Editing Mode
+### Running the restricted editing mode
 
-And add it to your plugin list and the toolbar configuration:
+In order to initialize the editor in the restricted editing mode add the {@link module:restricted-editing/restrictededitingmode~RestrictedEditingMode} plugin and add the `'restrictedEditing'` button to the toolbar:
 
 ```js
 import RestrictedEditingMode from '@ckeditor/ckeditor5-restricted-editing/src/restrictededitingmode';
@@ -60,17 +67,30 @@ ClassicEditor
 	.catch( ... );
 ```
 
-
 <info-box info>
 	Read more about {@link builds/guides/integration/installing-plugins installing plugins}.
 </info-box>
 
 ## Common API
 
+The {@link module:restricted-editing/standardeditingmode~StandardEditingMode} plugin registers:
+
+* The `'restrictedEditingException'` button which allows marking regions to be editable.
+* The {@link module:restricted-editing/restrictededitingexceptioncommand~RestrictedEditingExceptionCommand `'restrictedEditingException'`} command which allows marking regions to be editable..
+
+The {@link module:restricted-editing/restrictededitingmode~RestrictedEditingMode} plugin registers:
+
+* The `'restrictedEditing'` dropdown which allows navigating between editable regions.
+* The {@link module:restricted-editing/restrictededitingmodenavigationcommand~RestrictedEditingModeNavigationCommand `'goToPreviousRestrictedEditingException'`} and `'goToNextRestrictedEditingException'` commands which allow navigating between editable regions.
+
 <info-box>
 	We recommend using the official {@link framework/guides/development-tools#ckeditor-5-inspector CKEditor 5 inspector} for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more.
 </info-box>
 
+## Real-time collaboration
+
+When using the real-time collaboration, all the connected users should be always in the same mode. It is not possible to have different list of plugins among users of a single collaborative session.
+
 ## Contribute
 
 The source code of the feature is available on GitHub in https://github.com/ckeditor/ckeditor5-restricted-editing.

+ 12 - 12
packages/ckeditor5-restricted-editing/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@ckeditor/ckeditor5-restricted-editing",
-  "version": "0.0.1",
+  "version": "16.0.0",
   "description": "A restricted editing feature for CKEditor 5 editors.",
   "keywords": [
     "ckeditor",
@@ -9,19 +9,19 @@
     "ckeditor5-lib"
   ],
   "dependencies": {
-    "@ckeditor/ckeditor5-core": "^15.0.0",
-    "@ckeditor/ckeditor5-ui": "^15.0.0"
+    "@ckeditor/ckeditor5-core": "^16.0.0",
+    "@ckeditor/ckeditor5-ui": "^16.0.0"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-basic-styles": "^15.0.0",
-	"@ckeditor/ckeditor5-clipboard": "^15.0.0",
-    "@ckeditor/ckeditor5-editor-classic": "^15.0.0",
-    "@ckeditor/ckeditor5-engine": "^15.0.0",
-    "@ckeditor/ckeditor5-paragraph": "^15.0.0",
-    "@ckeditor/ckeditor5-table": "^15.0.0",
-    "@ckeditor/ckeditor5-typing": "^15.0.0",
-    "@ckeditor/ckeditor5-utils": "^15.0.0",
-    "@ckeditor/ckeditor5-undo": "^15.0.0",
+    "@ckeditor/ckeditor5-basic-styles": "^16.0.0",
+    "@ckeditor/ckeditor5-clipboard": "^16.0.0",
+    "@ckeditor/ckeditor5-editor-classic": "^16.0.0",
+    "@ckeditor/ckeditor5-engine": "^16.0.0",
+    "@ckeditor/ckeditor5-paragraph": "^16.0.0",
+    "@ckeditor/ckeditor5-table": "^16.0.0",
+    "@ckeditor/ckeditor5-typing": "^16.0.0",
+    "@ckeditor/ckeditor5-utils": "^16.0.0",
+    "@ckeditor/ckeditor5-undo": "^16.0.0",
     "eslint": "^5.5.0",
     "eslint-config-ckeditor5": "^2.0.0",
     "husky": "^2.4.1",

+ 2 - 2
packages/ckeditor5-restricted-editing/src/restrictededitingmode/converters.js

@@ -10,12 +10,12 @@
 import Matcher from '@ckeditor/ckeditor5-engine/src/view/matcher';
 import { getMarkerAtPosition } from './utils';
 
-const HIGHLIGHT_CLASS = 'ck-restricted-editing-exception_selected';
+const HIGHLIGHT_CLASS = 'restricted-editing-exception_selected';
 
 /**
  * Adds a visual highlight style to a restricted editing exception the selection is anchored to.
  *
- * Highlight is turned on by adding the `.ck-restricted-editing-exception_selected` class to the
+ * Highlight is turned on by adding the `.restricted-editing-exception_selected` class to the
  * exception in the view:
  *
  * * The class is removed before the conversion has started, as callbacks added with the `'highest'` priority

+ 5 - 5
packages/ckeditor5-restricted-editing/src/restrictededitingmodeediting.js

@@ -20,7 +20,7 @@ import { getMarkerAtPosition, isSelectionInMarker } from './restrictededitingmod
 /**
  * The Restricted Editing Mode editing feature.
  *
- * * It introduces the exception marker group that renders to `<spans>` with the `ck-restricted-editing-exception` CSS class.
+ * * It introduces the exception marker group that renders to `<spans>` with the `restricted-editing-exception` CSS class.
  * * It registers the `'goToPreviousRestrictedEditingException'` and `'goToNextRestrictedEditingException'` commands.
  * * Also enables highlighting exception markers that are selected.
  *
@@ -116,7 +116,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
 		editor.conversion.for( 'upcast' ).add( upcastHighlightToMarker( {
 			view: {
 				name: 'span',
-				classes: 'ck-restricted-editing-exception'
+				classes: 'restricted-editing-exception'
 			},
 			model: () => {
 				markerNumber++; // Starting from restrictedEditingException:1 marker.
@@ -134,7 +134,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
 			view: () => {
 				return {
 					name: 'span',
-					classes: 'ck-restricted-editing-exception',
+					classes: 'restricted-editing-exception',
 					priority: -10
 				};
 			}
@@ -146,7 +146,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
 			model: 'restrictedEditingException',
 			view: ( markerData, viewWriter ) => {
 				return viewWriter.createUIElement( 'span', {
-					class: 'ck-restricted-editing-exception ck-restricted-editing-exception_collapsed'
+					class: 'restricted-editing-exception restricted-editing-exception_collapsed'
 				} );
 			}
 		} );
@@ -155,7 +155,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
 			model: 'restrictedEditingException',
 			view: ( markerData, viewWriter ) => {
 				return viewWriter.createEmptyElement( 'span', {
-					class: 'ck-restricted-editing-exception'
+					class: 'restricted-editing-exception'
 				} );
 			}
 		} );

+ 3 - 3
packages/ckeditor5-restricted-editing/src/standardeditingmodeediting.js

@@ -14,7 +14,7 @@ import RestrictedEditingExceptionCommand from './restrictededitingexceptioncomma
  * The Standard Editing Mode editing feature.
  *
  * * It introduces the `restrictedEditingException` text attributes that is rendered as
- * `<spans>` with the `ck-restricted-editing-exception` CSS class.
+ * `<spans>` with the `restricted-editing-exception` CSS class.
  * * It registers the `'restrictedEditingException'` command.
  *
  * @extends module:core/plugin~Plugin
@@ -39,7 +39,7 @@ export default class StandardEditingModeEditing extends Plugin {
 			model: 'restrictedEditingException',
 			view: {
 				name: 'span',
-				classes: 'ck-restricted-editing-exception'
+				classes: 'restricted-editing-exception'
 			}
 		} );
 
@@ -48,7 +48,7 @@ export default class StandardEditingModeEditing extends Plugin {
 			view: ( modelAttributeValue, viewWriter ) => {
 				if ( modelAttributeValue ) {
 					// Make the restricted editing <span> outer-most in the view.
-					return viewWriter.createAttributeElement( 'span', { class: 'ck-restricted-editing-exception' }, { priority: -10 } );
+					return viewWriter.createAttributeElement( 'span', { class: 'restricted-editing-exception' }, { priority: -10 } );
 				}
 			}
 		} );

+ 4 - 4
packages/ckeditor5-restricted-editing/tests/manual/restrictedediting.html

@@ -6,15 +6,15 @@
 
 <div id="editor">
 	<h2>Heading 1</h2>
-	<p>Paragraph <span class="ck-restricted-editing-exception">it is editable</span></p>
-	<p>Exception on part of a word: <a href="ckeditor.com">coompi</a><span class="ck-restricted-editing-exception"><a href="ckeditor.com">ter</a> (fix spelling in Firefox).</span></p>
+	<p>Paragraph <span class="restricted-editing-exception">it is editable</span></p>
+	<p>Exception on part of a word: <a href="ckeditor.com">coompi</a><span class="restricted-editing-exception"><a href="ckeditor.com">ter</a> (fix spelling in Firefox).</span></p>
 	<p><strong>Bold</strong> <i>Italic</i> <a href="foo">Link</a></p>
 	<ul>
 		<li>UL List item 1</li>
 		<li>UL List item 2</li>
 	</ul>
 	<ol>
-		<li><span class="ck-restricted-editing-exception">OL List item 1</span></li>
+		<li><span class="restricted-editing-exception">OL List item 1</span></li>
 		<li>OL List item 2</li>
 	</ol>
 	<figure class="image image-style-side">
@@ -25,7 +25,7 @@
 		<p>Quote</p>
 		<ul>
 			<li>Quoted UL List item 1</li>
-			<li>Quoted UL List item <span class="ck-restricted-editing-exception">2</span></li>
+			<li>Quoted UL List item <span class="restricted-editing-exception">2</span></li>
 		</ul>
 		<p>Quote</p>
 	</blockquote>

+ 25 - 25
packages/ckeditor5-restricted-editing/tests/restrictededitingmodeediting.js

@@ -63,8 +63,8 @@ describe( 'RestrictedEditingModeEditing', () => {
 		} );
 
 		describe( 'upcast', () => {
-			it( 'should convert <span class="ck-restricted-editing-exception"> to marker', () => {
-				editor.setData( '<p>foo <span class="ck-restricted-editing-exception">bar</span> baz</p>' );
+			it( 'should convert <span class="restricted-editing-exception"> to marker', () => {
+				editor.setData( '<p>foo <span class="restricted-editing-exception">bar</span> baz</p>' );
 
 				expect( model.markers.has( 'restrictedEditingException:1' ) ).to.be.true;
 
@@ -74,10 +74,10 @@ describe( 'RestrictedEditingModeEditing', () => {
 				expect( marker.getEnd().path ).to.deep.equal( [ 0, 7 ] );
 			} );
 
-			it( 'should convert multiple <span class="ck-restricted-editing-exception">', () => {
+			it( 'should convert multiple <span class="restricted-editing-exception">', () => {
 				editor.setData(
-					'<p>foo <span class="ck-restricted-editing-exception">bar</span> baz</p>' +
-					'<p>ABCDEF<span class="ck-restricted-editing-exception">GHIJK</span>LMNOPQRST</p>'
+					'<p>foo <span class="restricted-editing-exception">bar</span> baz</p>' +
+					'<p>ABCDEF<span class="restricted-editing-exception">GHIJK</span>LMNOPQRST</p>'
 				);
 
 				expect( model.markers.has( 'restrictedEditingException:1' ) ).to.be.true;
@@ -111,7 +111,7 @@ describe( 'RestrictedEditingModeEditing', () => {
 					} );
 				} );
 
-				const expectedView = '<p>foo <span class="ck-restricted-editing-exception">bar</span> baz</p>';
+				const expectedView = '<p>foo <span class="restricted-editing-exception">bar</span> baz</p>';
 				expect( editor.getData() ).to.equal( expectedView );
 				expect( getViewData( editor.editing.view, { withoutSelection: true } ) ).to.equal( expectedView );
 			} );
@@ -129,9 +129,9 @@ describe( 'RestrictedEditingModeEditing', () => {
 					} );
 				} );
 
-				expect( editor.getData() ).to.equal( '<p>foo <span class="ck-restricted-editing-exception"></span>bar baz</p>' );
+				expect( editor.getData() ).to.equal( '<p>foo <span class="restricted-editing-exception"></span>bar baz</p>' );
 				expect( getViewData( editor.editing.view, { withoutSelection: true } ) ).to.equal(
-					'<p>foo <span class="ck-restricted-editing-exception ck-restricted-editing-exception_collapsed"></span>bar baz</p>'
+					'<p>foo <span class="restricted-editing-exception restricted-editing-exception_collapsed"></span>bar baz</p>'
 				);
 			} );
 
@@ -150,11 +150,11 @@ describe( 'RestrictedEditingModeEditing', () => {
 				} );
 
 				expect( editor.getData() ).to.equal(
-					'<p><span class="ck-restricted-editing-exception"><b>foo bar baz</b></span></p>'
+					'<p><span class="restricted-editing-exception"><b>foo bar baz</b></span></p>'
 				);
 				expect( getViewData( editor.editing.view, { withoutSelection: true } ) ).to.equal(
 					'<p>' +
-						'<span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected"><b>foo bar baz</b></span>' +
+						'<span class="restricted-editing-exception restricted-editing-exception_selected"><b>foo bar baz</b></span>' +
 					'</p>'
 				);
 			} );
@@ -201,12 +201,12 @@ describe( 'RestrictedEditingModeEditing', () => {
 			} );
 
 			expect( editor.getData() ).to.equal(
-				'<p>foo <span class="ck-restricted-editing-exception">bar</span> baz</p>' +
-				'<p>xxx <span class="ck-restricted-editing-exception">yRyy</span> zzz</p>' );
+				'<p>foo <span class="restricted-editing-exception">bar</span> baz</p>' +
+				'<p>xxx <span class="restricted-editing-exception">yRyy</span> zzz</p>' );
 
 			expect( getViewData( editor.editing.view, { withoutSelection: true } ) ).to.equal(
-				'<p>foo <span class="ck-restricted-editing-exception">bar</span> baz</p>' +
-				'<p>xxx <span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">yRyy</span> zzz</p>' );
+				'<p>foo <span class="restricted-editing-exception">bar</span> baz</p>' +
+				'<p>xxx <span class="restricted-editing-exception restricted-editing-exception_selected">yRyy</span> zzz</p>' );
 		} );
 
 		it( 'should block user typing outside exception markers', () => {
@@ -765,7 +765,7 @@ describe( 'RestrictedEditingModeEditing', () => {
 			} );
 
 			expect( getViewData( view ) ).to.equal(
-				'<p>foo <span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">b{a}r</span> baz</p>'
+				'<p>foo <span class="restricted-editing-exception restricted-editing-exception_selected">b{a}r</span> baz</p>'
 			);
 		} );
 
@@ -784,13 +784,13 @@ describe( 'RestrictedEditingModeEditing', () => {
 			} );
 
 			expect( getViewData( view ) ).to.equal(
-				'<p>foo <span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">b{a}r</span> baz</p>'
+				'<p>foo <span class="restricted-editing-exception restricted-editing-exception_selected">b{a}r</span> baz</p>'
 			);
 
 			model.change( writer => writer.setSelection( model.document.getRoot().getChild( 0 ), 0 ) );
 
 			expect( getViewData( view ) ).to.equal(
-				'<p>{}foo <span class="ck-restricted-editing-exception">bar</span> baz</p>'
+				'<p>{}foo <span class="restricted-editing-exception">bar</span> baz</p>'
 			);
 		} );
 
@@ -809,13 +809,13 @@ describe( 'RestrictedEditingModeEditing', () => {
 			} );
 
 			expect( getViewData( view ) ).to.equal(
-				'<p>{}foo <span class="ck-restricted-editing-exception">bar</span> baz</p>'
+				'<p>{}foo <span class="restricted-editing-exception">bar</span> baz</p>'
 			);
 
 			model.change( writer => writer.setSelection( model.document.getRoot().getChild( 0 ), 6 ) );
 
 			expect( getViewData( view ) ).to.equal(
-				'<p>foo <span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">ba{}r</span> baz</p>'
+				'<p>foo <span class="restricted-editing-exception restricted-editing-exception_selected">ba{}r</span> baz</p>'
 			);
 		} );
 
@@ -839,7 +839,7 @@ describe( 'RestrictedEditingModeEditing', () => {
 				} );
 
 				expect( getViewData( view ) ).to.equal(
-					'<p>foo <span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">bFOO{a}r</span> baz</p>'
+					'<p>foo <span class="restricted-editing-exception restricted-editing-exception_selected">bFOO{a}r</span> baz</p>'
 				);
 			} );
 
@@ -865,7 +865,7 @@ describe( 'RestrictedEditingModeEditing', () => {
 				} );
 
 				expect( getViewData( view ) ).to.equal(
-					'<p>foo <span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">b{}r</span> baz</p>'
+					'<p>foo <span class="restricted-editing-exception restricted-editing-exception_selected">b{}r</span> baz</p>'
 				);
 			} );
 
@@ -892,7 +892,7 @@ describe( 'RestrictedEditingModeEditing', () => {
 
 				expect( getViewData( view ) ).to.equal(
 					'<p>foo ' +
-						'<span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">' +
+						'<span class="restricted-editing-exception restricted-editing-exception_selected">' +
 							'<strong>b{a</strong>' +
 						'}r</span>' +
 					' baz</p>'
@@ -921,7 +921,7 @@ describe( 'RestrictedEditingModeEditing', () => {
 				} );
 
 				expect( getViewData( view ) ).to.equal(
-					'<p>foo {<span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">ba}r</span> baz</p>'
+					'<p>foo {<span class="restricted-editing-exception restricted-editing-exception_selected">ba}r</span> baz</p>'
 				);
 			} );
 
@@ -953,7 +953,7 @@ describe( 'RestrictedEditingModeEditing', () => {
 				expect( getViewData( view ) ).to.equal(
 					'<p>' +
 						'<span>foo </span>' +
-						'<span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">' +
+						'<span class="restricted-editing-exception restricted-editing-exception_selected">' +
 							'<span>b</span>{a}r' +
 						'</span>' +
 					' baz</p>'
@@ -962,7 +962,7 @@ describe( 'RestrictedEditingModeEditing', () => {
 				model.change( writer => writer.removeMarker( 'fooMarker' ) );
 
 				expect( getViewData( view ) ).to.equal(
-					'<p>foo <span class="ck-restricted-editing-exception ck-restricted-editing-exception_selected">b{a}r</span> baz</p>'
+					'<p>foo <span class="restricted-editing-exception restricted-editing-exception_selected">b{a}r</span> baz</p>'
 				);
 			} );
 		} );

+ 4 - 4
packages/ckeditor5-restricted-editing/tests/standardeditingmodeediting.js

@@ -52,8 +52,8 @@ describe( 'StandardEditingModeEditing', () => {
 
 	describe( 'conversion', () => {
 		describe( 'upcast', () => {
-			it( 'should convert <span class="ck-restricted-editing-exception"> to the model attribute', () => {
-				editor.setData( '<p>foo <span class="ck-restricted-editing-exception">bar</span> baz</p>' );
+			it( 'should convert <span class="restricted-editing-exception"> to the model attribute', () => {
+				editor.setData( '<p>foo <span class="restricted-editing-exception">bar</span> baz</p>' );
 
 				expect( getModelData( model, { withoutSelection: true } ) )
 					.to.equal( '<paragraph>foo <$text restrictedEditingException="true">bar</$text> baz</paragraph>' );
@@ -62,7 +62,7 @@ describe( 'StandardEditingModeEditing', () => {
 
 		describe( 'downcast', () => {
 			it( 'should convert the model attribute to a <span>', () => {
-				const expectedView = '<p>foo <span class="ck-restricted-editing-exception">bar</span> baz</p>';
+				const expectedView = '<p>foo <span class="restricted-editing-exception">bar</span> baz</p>';
 
 				setModelData( editor.model,
 					'<paragraph>foo <$text restrictedEditingException="true">bar</$text> baz</paragraph>'
@@ -82,7 +82,7 @@ describe( 'StandardEditingModeEditing', () => {
 					view: 'i'
 				} );
 
-				const expectedView = '<p><span class="ck-restricted-editing-exception"><b>foo</b> <i>bar</i> baz</span></p>';
+				const expectedView = '<p><span class="restricted-editing-exception"><b>foo</b> <i>bar</i> baz</span></p>';
 
 				setModelData( editor.model,
 					'<paragraph>' +