8
0
Pārlūkot izejas kodu

Got rid of Feature class and renamed featureComponents.

Piotrek Koszuliński 9 gadi atpakaļ
vecāks
revīzija
f4e7052bd8

+ 3 - 3
packages/ckeditor5-undo/src/undo.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-import Feature from '../core/feature.js';
+import Plugin from '../core/plugin.js';
 import UndoEngine from './undoengine.js';
 import ButtonView from '../ui/button/buttonview.js';
 
@@ -119,7 +119,7 @@ import ButtonView from '../ui/button/buttonview.js';
  * @memberOf undo
  * @extends core.Feature
  */
-export default class Undo extends Feature {
+export default class Undo extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
@@ -154,7 +154,7 @@ export default class Undo extends Feature {
 		const editor = this.editor;
 		const command = editor.commands.get( name );
 
-		editor.ui.featureComponents.add( name, ( locale ) => {
+		editor.ui.componentFactory.add( name, ( locale ) => {
 			const view = new ButtonView( locale );
 
 			view.set( {

+ 2 - 2
packages/ckeditor5-undo/src/undoengine.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-import Feature from '../core/feature.js';
+import Plugin from '../core/plugin.js';
 import UndoCommand from './undocommand.js';
 import RedoCommand from './redocommand.js';
 
@@ -16,7 +16,7 @@ import RedoCommand from './redocommand.js';
  * @memberOf undo
  * @extends core.Feature
  */
-export default class UndoEngine extends Feature {
+export default class UndoEngine extends Plugin {
 	/**
 	 * @inheritDoc
 	 */

+ 1 - 1
packages/ckeditor5-undo/tests/manual/undo.js

@@ -15,7 +15,7 @@ import Bold from '/ckeditor5/basic-styles/bold.js';
 import Italic from '/ckeditor5/basic-styles/italic.js';
 
 ClassicEditor.create( document.querySelector( '#editor' ), {
-	features: [ Enter, Typing, Paragraph, Heading, Undo, Bold, Italic ],
+	plugins: [ Enter, Typing, Paragraph, Heading, Undo, Bold, Italic ],
 	toolbar: [ 'headings', 'bold', 'italic', 'undo', 'redo' ]
 } )
 .then( editor => {

+ 2 - 2
packages/ckeditor5-undo/tests/undo.js

@@ -21,7 +21,7 @@ describe( 'Undo', () => {
 		const editorElement = document.createElement( 'div' );
 
 		return ClassicTestEditor.create( editorElement, {
-				features: [ Undo ]
+				plugins: [ Undo ]
 			} )
 			.then( newEditor => {
 				editor = newEditor;
@@ -71,7 +71,7 @@ describe( 'Undo', () => {
 			let button;
 
 			beforeEach( () => {
-				button = editor.ui.featureComponents.create( featureName );
+				button = editor.ui.componentFactory.create( featureName );
 			} );
 
 			it( 'should register feature component', () => {

+ 1 - 1
packages/ckeditor5-undo/tests/undoengine-integration.js

@@ -14,7 +14,7 @@ let editor, doc, root;
 
 beforeEach( () => {
 	return ModelTestEditor.create( {
-			features: [ UndoEngine ]
+			plugins: [ UndoEngine ]
 		} )
 		.then( newEditor => {
 			editor = newEditor;