8
0
Pārlūkot izejas kodu

Merge branch 't/ckeditor5-core/45'

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

+ 1 - 1
packages/ckeditor5-editor-classic/src/classic.js

@@ -59,7 +59,7 @@ export default class ClassicEditor extends StandardEditor {
 	 * Creates a classic editor instance.
 	 *
 	 *		ClassicEditor.create( document.querySelector( '#editor' ), {
-	 *			features: [ Delete, Enter, Typing, Paragraph, Undo, Bold, Italic ],
+	 *			plugins: [ Delete, Enter, Typing, Paragraph, Undo, Bold, Italic ],
 	 *			toolbar: [ 'bold', 'italic', 'undo', 'redo' ]
 	 *		} )
 	 *		.then( editor => {

+ 3 - 3
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -39,9 +39,9 @@ export default class ClassicEditorUI {
 		 * Instance of the {@link ui.ComponentFactory}.
 		 *
 		 * @readonly
-		 * @member {ui.ComponentFactory} editor-classic.ClassicEditorUI#featureComponents
+		 * @member {ui.ComponentFactory} editor-classic.ClassicEditorUI#componentFactory
 		 */
-		this.featureComponents = new ComponentFactory( editor );
+		this.componentFactory = new ComponentFactory( editor );
 
 		/**
 		 * Keeps information about editor focus.
@@ -81,7 +81,7 @@ export default class ClassicEditorUI {
 
 				if ( toolbarConfig ) {
 					for ( let name of toolbarConfig ) {
-						promises.push( this.view.toolbar.items.add( this.featureComponents.create( name ) ) );
+						promises.push( this.view.toolbar.items.add( this.componentFactory.create( name ) ) );
 					}
 				}
 

+ 2 - 2
packages/ckeditor5-editor-classic/tests/classic.js

@@ -61,7 +61,7 @@ describe( 'ClassicEditor', () => {
 	describe( 'create', () => {
 		beforeEach( function() {
 			return ClassicEditor.create( editorElement, {
-					features: [ Paragraph, Bold ]
+					plugins: [ Paragraph, Bold ]
 				} )
 				.then( newEditor => {
 					editor = newEditor;
@@ -87,7 +87,7 @@ describe( 'ClassicEditor', () => {
 
 	describe( 'destroy', () => {
 		beforeEach( function() {
-			return ClassicEditor.create( editorElement, { features: [ Paragraph ] } )
+			return ClassicEditor.create( editorElement, { plugins: [ Paragraph ] } )
 				.then( newEditor => {
 					editor = newEditor;
 				} );

+ 4 - 4
packages/ckeditor5-editor-classic/tests/classiceditorui.js

@@ -37,8 +37,8 @@ describe( 'ClassicEditorUI', () => {
 		ui = new ClassicEditorUI( editor, view );
 		editable = editor.editing.view.getRoot();
 
-		ui.featureComponents.add( 'foo', viewCreator( 'foo' ) );
-		ui.featureComponents.add( 'bar', viewCreator( 'bar' ) );
+		ui.componentFactory.add( 'foo', viewCreator( 'foo' ) );
+		ui.componentFactory.add( 'bar', viewCreator( 'bar' ) );
 	} );
 
 	describe( 'constructor()', () => {
@@ -50,8 +50,8 @@ describe( 'ClassicEditorUI', () => {
 			expect( ui.view ).to.equal( view );
 		} );
 
-		it( 'creates #featureComponents factory', () => {
-			expect( ui.featureComponents ).to.be.instanceOf( ComponentFactory );
+		it( 'creates #componentFactory factory', () => {
+			expect( ui.componentFactory ).to.be.instanceOf( ComponentFactory );
 		} );
 
 		it( 'creates #focusTracker', () => {

+ 1 - 1
packages/ckeditor5-editor-classic/tests/manual/classic.js

@@ -19,7 +19,7 @@ let editor, editable, observer;
 
 function initEditor() {
 	ClassicEditor.create( document.querySelector( '#editor' ), {
-		features: [ Enter, Typing, Paragraph, Undo, Heading, Bold, Italic ],
+		plugins: [ Enter, Typing, Paragraph, Undo, Heading, Bold, Italic ],
 		toolbar: [ 'headings', 'bold', 'italic', 'undo', 'redo' ]
 	} )
 	.then( newEditor => {