Browse Source

Revert: Editor does not support built-in plugins yet.

Kamil Piechaczek 8 years ago
parent
commit
9ec343623e

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

@@ -45,7 +45,7 @@ export default class Editor {
 		 * @readonly
 		 * @member {module:core/plugin~PluginCollection}
 		 */
-		this.plugins = new PluginCollection( this, this.config.get( 'plugins' ) );
+		this.plugins = new PluginCollection( this );
 
 		/**
 		 * Commands registered to the editor.

+ 1 - 1
packages/ckeditor5-core/src/plugincollection.js

@@ -21,7 +21,7 @@ export default class PluginCollection {
 	 * @param {module:core/editor/editor~Editor} editor
 	 * @param {Array.<module:core/plugin>} availablePlugins
 	 */
-	constructor( editor, availablePlugins ) {
+	constructor( editor, availablePlugins = [] ) {
 		/**
 		 * @protected
 		 * @member {module:core/editor/editor~Editor} module:core/plugin~PluginCollection#_editor

+ 1 - 3
packages/ckeditor5-core/tests/plugincollection.js

@@ -50,9 +50,7 @@ before( () => {
 	PluginJ.requires = [ 'K' ];
 	PluginK.requires = [ PluginA ];
 
-	editor = new Editor( {
-		plugins: []
-	} );
+	editor = new Editor();
 } );
 
 describe( 'PluginCollection', () => {