8
0
فهرست منبع

Got rid of Feature class and renamed featureComponents.

Piotrek Koszuliński 9 سال پیش
والد
کامیت
ebf54cdf4a

+ 3 - 4
packages/ckeditor5-list/src/list.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-import Feature from '../core/feature.js';
+import Plugin from '../core/plugin.js';
 import ListEngine from './listengine.js';
 import ButtonView from '../ui/button/buttonview.js';
 import { parseKeystroke } from '../utils/keyboard.js';
@@ -17,7 +17,7 @@ import { parseKeystroke } from '../utils/keyboard.js';
  * @memberOf list
  * @extends core.Feature
  */
-export default class List extends Feature {
+export default class List extends Plugin {
 	/**
 	 * @inheritDoc
 	 */
@@ -84,8 +84,7 @@ export default class List extends Feature {
 		const editor = this.editor;
 		const command = editor.commands.get( commandName );
 
-		// Add button to feature components.
-		editor.ui.featureComponents.add( commandName, ( locale ) => {
+		editor.ui.componentFactory.add( commandName, ( locale ) => {
 			const buttonView = new ButtonView( locale );
 
 			buttonView.set( {

+ 2 - 2
packages/ckeditor5-list/src/listengine.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md.
  */
 
-import Feature from '../core/feature.js';
+import Plugin from '../core/plugin.js';
 import ListCommand from './listcommand.js';
 import IndentCommand from './indentcommand.js';
 
@@ -28,7 +28,7 @@ import {
  * @memberOf list
  * @extends core.Feature
  */
-export default class ListEngine extends Feature {
+export default class ListEngine extends Plugin {
 	/**
 	 * @inheritDoc
 	 */

+ 3 - 3
packages/ckeditor5-list/tests/list.js

@@ -20,14 +20,14 @@ describe( 'List', () => {
 		document.body.appendChild( editorElement );
 
 		return ClassicTestEditor.create( editorElement, {
-			features: [ Paragraph, List ]
+			plugins: [ Paragraph, List ]
 		} )
 			.then( newEditor => {
 				editor = newEditor;
 				schema = editor.document.schema;
 
-				bulletedListButton = editor.ui.featureComponents.create( 'bulletedList' );
-				numberedListButton = editor.ui.featureComponents.create( 'numberedList' );
+				bulletedListButton = editor.ui.componentFactory.create( 'bulletedList' );
+				numberedListButton = editor.ui.componentFactory.create( 'numberedList' );
 			} );
 	} );
 

+ 1 - 1
packages/ckeditor5-list/tests/listengine.js

@@ -23,7 +23,7 @@ describe( 'ListEngine', () => {
 
 	beforeEach( () => {
 		return VirtualTestEditor.create( {
-			features: [ Paragraph, ListEngine ]
+			plugins: [ Paragraph, ListEngine ]
 		} )
 			.then( newEditor => {
 				editor = newEditor;

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

@@ -14,7 +14,7 @@ import Undo from '/ckeditor5/undo/undo.js';
 import List from '/ckeditor5/list/list.js';
 
 ClassicEditor.create( document.querySelector( '#editor' ), {
-	features: [ Enter, Typing, Heading, Paragraph, Undo, List ],
+	plugins: [ Enter, Typing, Heading, Paragraph, Undo, List ],
 	toolbar: [ 'headings', 'bulletedList', 'numberedList', 'undo', 'redo' ]
 } )
 .then( editor => {