Explorar el Código

Rename standard mode plugins.

Maciej Gołaszewski hace 6 años
padre
commit
da1c2ea0e5

+ 6 - 6
packages/ckeditor5-restricted-editing/src/restrictededitingexception.js → packages/ckeditor5-restricted-editing/src/standardmode.js

@@ -4,28 +4,28 @@
  */
 
 /**
- * @module restricted-editing/restrictededitingexception
+ * @module restricted-editing/standardmode
  */
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
-import RestrictedEditingExceptionEditing from './restrictededitingexceptionediting';
-import RestrictedEditingExceptionUI from './restrictededitingexceptionui';
+import StandardModeEditing from './standardmodeediting';
+import StandardModeUI from './standardmodeui';
 
 import '../theme/restrictedediting.css';
 
 /**
  * @extends module:core/plugin~Plugin
  */
-export default class RestrictedEditingException extends Plugin {
+export default class StandardMode extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
 	static get pluginName() {
-		return 'RestrictedEditingException';
+		return 'StandardMode';
 	}
 
 	static get requires() {
-		return [ RestrictedEditingExceptionEditing, RestrictedEditingExceptionUI ];
+		return [ StandardModeEditing, StandardModeUI ];
 	}
 }

+ 3 - 3
packages/ckeditor5-restricted-editing/src/restrictededitingexceptionediting.js → packages/ckeditor5-restricted-editing/src/standardmodeediting.js

@@ -4,7 +4,7 @@
  */
 
 /**
- * @module restricted-editing/restrictededitingexceptionediting
+ * @module restricted-editing/standardmodeediting
  */
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
@@ -13,12 +13,12 @@ import RestrictedEditingExceptionCommand from './restrictededitingexceptioncomma
 /**
  * @extends module:core/plugin~Plugin
  */
-export default class RestrictedEditingExceptionEditing extends Plugin {
+export default class StandardModeEditing extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
 	static get pluginName() {
-		return 'RestrictedEditingExceptionEditing';
+		return 'StandardModeEditing';
 	}
 
 	/**

+ 2 - 2
packages/ckeditor5-restricted-editing/src/restrictededitingexceptionui.js → packages/ckeditor5-restricted-editing/src/standardmodeui.js

@@ -4,7 +4,7 @@
  */
 
 /**
- * @module restricted-editing/restrictededitingexceptionui
+ * @module restricted-editing/standardmodeui
  */
 
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
@@ -15,7 +15,7 @@ import unlockIcon from '../theme/icons/contentunlock.svg';
 /**
  * @extends module:core/plugin~Plugin
  */
-export default class RestrictedEditingExceptionUI extends Plugin {
+export default class StandardModeUI extends Plugin {
 	/**
 	 * @inheritDoc
 	 */

+ 2 - 2
packages/ckeditor5-restricted-editing/tests/manual/restrictedediting.js

@@ -9,7 +9,7 @@ import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'
 import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 import Table from '@ckeditor/ckeditor5-table/src/table';
 
-import RestrictedEditingException from '../../src/restrictededitingexception';
+import StandardMode from '../../src/standardmode';
 import RestrictedMode from '../../src/restrictedmode';
 
 const restrictedModeButton = document.getElementById( 'mode-restricted' );
@@ -34,7 +34,7 @@ function startMode( selectedMode ) {
 
 async function startStandardMode() {
 	await reloadEditor( {
-		plugins: [ ArticlePluginSet, Table, RestrictedEditingException ],
+		plugins: [ ArticlePluginSet, Table, StandardMode ],
 		toolbar: [
 			'heading', '|', 'bold', 'italic', 'link', '|',
 			'bulletedList', 'numberedList', 'blockQuote', 'insertTable', '|',

+ 0 - 44
packages/ckeditor5-restricted-editing/tests/restrictededitingexception.js

@@ -1,44 +0,0 @@
-/**
- * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
-
-/* global document */
-
-import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
-import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
-
-import RestrictedEditingException from './../src/restrictededitingexception';
-import RestrictedEditingExceptionUI from './../src/restrictededitingexceptionui';
-import RestrictedEditingExceptionEditing from './../src/restrictededitingexceptionediting';
-
-describe( 'RestrictedEditingException', () => {
-	let editor, element;
-
-	testUtils.createSinonSandbox();
-
-	beforeEach( async () => {
-		element = document.createElement( 'div' );
-		document.body.appendChild( element );
-
-		editor = await ClassicTestEditor.create( element, { plugins: [ RestrictedEditingException ] } );
-	} );
-
-	afterEach( () => {
-		element.remove();
-
-		return editor.destroy();
-	} );
-
-	it( 'should be named', () => {
-		expect( RestrictedEditingException.pluginName ).to.equal( 'RestrictedEditingException' );
-	} );
-
-	it( 'should load the RestrictedEditingExceptionEditing plugin', () => {
-		expect( editor.plugins.get( RestrictedEditingExceptionEditing ) ).to.be.instanceOf( RestrictedEditingExceptionEditing );
-	} );
-
-	it( 'should load the RestrictedEditingExceptionUI plugin', () => {
-		expect( editor.plugins.get( RestrictedEditingExceptionUI ) ).to.be.instanceOf( RestrictedEditingExceptionUI );
-	} );
-} );

+ 44 - 0
packages/ckeditor5-restricted-editing/tests/standardmode.js

@@ -0,0 +1,44 @@
+/**
+ * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
+ */
+
+/* global document */
+
+import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
+import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
+
+import StandardMode from './../src/standardmode';
+import StandardModeUI from './../src/standardmodeui';
+import StandardModeEditing from './../src/standardmodeediting';
+
+describe( 'StandardMode', () => {
+	let editor, element;
+
+	testUtils.createSinonSandbox();
+
+	beforeEach( async () => {
+		element = document.createElement( 'div' );
+		document.body.appendChild( element );
+
+		editor = await ClassicTestEditor.create( element, { plugins: [ StandardMode ] } );
+	} );
+
+	afterEach( () => {
+		element.remove();
+
+		return editor.destroy();
+	} );
+
+	it( 'should be named', () => {
+		expect( StandardMode.pluginName ).to.equal( 'StandardMode' );
+	} );
+
+	it( 'should load the StandardModeEditing plugin', () => {
+		expect( editor.plugins.get( StandardModeEditing ) ).to.be.instanceOf( StandardModeEditing );
+	} );
+
+	it( 'should load the StandardModeUI plugin', () => {
+		expect( editor.plugins.get( StandardModeUI ) ).to.be.instanceOf( StandardModeUI );
+	} );
+} );

+ 5 - 5
packages/ckeditor5-restricted-editing/tests/restrictededitingexceptionediting.js → packages/ckeditor5-restricted-editing/tests/standardmodeediting.js

@@ -9,17 +9,17 @@ import { getData as getViewData } from '@ckeditor/ckeditor5-engine/src/dev-utils
 import { getData as getModelData, setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-import RestrictedEditingExceptionEditing from '../src/restrictededitingexceptionediting';
+import StandardModeEditing from '../src/standardmodeediting';
 import RestrictedEditingExceptionCommand from '../src/restrictededitingexceptioncommand';
 import { assertEqualMarkup } from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
 
-describe( 'RestrictedEditingExceptionEditing', () => {
+describe( 'StandardModeEditing', () => {
 	let editor, model;
 
 	testUtils.createSinonSandbox();
 
 	beforeEach( async () => {
-		editor = await VirtualTestEditor.create( { plugins: [ Paragraph, RestrictedEditingExceptionEditing ] } );
+		editor = await VirtualTestEditor.create( { plugins: [ Paragraph, StandardModeEditing ] } );
 		model = editor.model;
 	} );
 
@@ -28,11 +28,11 @@ describe( 'RestrictedEditingExceptionEditing', () => {
 	} );
 
 	it( 'should be named', () => {
-		expect( RestrictedEditingExceptionEditing.pluginName ).to.equal( 'RestrictedEditingExceptionEditing' );
+		expect( StandardModeEditing.pluginName ).to.equal( 'StandardModeEditing' );
 	} );
 
 	it( 'should be loaded', () => {
-		expect( editor.plugins.get( 'RestrictedEditingExceptionEditing' ) ).to.be.instanceOf( RestrictedEditingExceptionEditing );
+		expect( editor.plugins.get( 'StandardModeEditing' ) ).to.be.instanceOf( StandardModeEditing );
 	} );
 
 	it( 'should set proper schema rules', () => {

+ 4 - 4
packages/ckeditor5-restricted-editing/tests/restrictededitingexceptionui.js → packages/ckeditor5-restricted-editing/tests/standardmodeui.js

@@ -10,10 +10,10 @@ import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictest
 import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 
-import RestrictedEditingExceptionUI from '../src/restrictededitingexceptionui';
-import RestrictedEditingException from '../src/restrictededitingexception';
+import StandardModeUI from '../src/standardmodeui';
+import StandardModeEditing from '../src/standardmodeediting';
 
-describe( 'RestrictedEditingExceptionUI', () => {
+describe( 'StandardModeUI', () => {
 	let editor, buttonView;
 
 	testUtils.createSinonSandbox();
@@ -23,7 +23,7 @@ describe( 'RestrictedEditingExceptionUI', () => {
 		document.body.appendChild( editorElement );
 
 		editor = await ClassicTestEditor.create( editorElement, {
-			plugins: [ Paragraph, RestrictedEditingException, RestrictedEditingExceptionUI ]
+			plugins: [ Paragraph, StandardModeEditing, StandardModeUI ]
 		} );
 
 		buttonView = editor.ui.componentFactory.create( 'restrictedEditingException' );