Răsfoiți Sursa

Revert "Docs: Updated references to `editor.create()` method."

This reverts commit b2b65f47d87d1a0f5c7194a34ac0c38917f9f3a9.
Krzysztof Krztoń 7 ani în urmă
părinte
comite
bbff927e8b

+ 18 - 5
packages/ckeditor5-core/src/editor/editor.js

@@ -49,6 +49,8 @@ export default class Editor {
 	/**
 	 * Creates a new instance of the Editor class.
 	 *
+	 * Usually, not to be used directly. See the static {@link module:core/editor/editor~Editor.create `create()`} method.
+	 *
 	 * @param {Object} [config] The editor config.
 	 */
 	constructor( config ) {
@@ -112,10 +114,10 @@ export default class Editor {
 		 *
 		 * The editor is in one of the following states:
 		 *
-		 * * `initializing` - during the editor initialization - before {@link #event:ready editor ready event} is fired
-		 * or specific editor creator `editor#create()` method finishes its job,
-		 * * `ready` - after the {@link #event:ready editor ready event} is fired or the promise returned
-		 * by the specific editor creator `editor#create()` method is resolved,
+		 * * `initializing` - during the editor initialization (before {@link module:core/editor/editor~Editor.create `Editor.create()`})
+		 * finished its job,
+		 * * `ready` - after the promise returned by the {@link module:core/editor/editor~Editor.create `Editor.create()`}
+		 * method is resolved,
 		 * * `destroyed` - once the {@link #destroy `editor.destroy()`} method was called.
 		 *
 		 * @observable
@@ -273,6 +275,17 @@ export default class Editor {
 	execute( ...args ) {
 		this.commands.execute( ...args );
 	}
+
+	/**
+	 * Creates and initializes a new editor instance.
+	 *
+	 * @static
+	 * @method module:core/editor/editor~Editor.create
+	 * @param {Object} config The editor config. You can find the list of config options in
+	 * {@link module:core/editor/editorconfig~EditorConfig}.
+	 * @returns {Promise} Promise resolved once editor is ready.
+	 * @returns {module:core/editor/editor~Editor} return.editor The editor instance.
+	 */
 }
 
 mix( Editor, ObservableMixin );
@@ -283,7 +296,7 @@ mix( Editor, ObservableMixin );
  *
  * Note: This event is most useful for plugin developers. When integrating the editor with your website or
  * application you do not have to listen to `editor#ready` because when the promise returned by the static
- * `Editor.create()` method (provided by the specific editor creators) is resolved, the editor is already ready.
+ * {@link module:core/editor/editor~Editor.create `Editor.create()`} event is resolved, the editor is already ready.
  * In fact, since the first moment when the editor instance is available to you is inside `then()`'s callback,
  * you cannot even add a listener to the `editor#ready` event.
  *

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

@@ -171,7 +171,7 @@ mix( Plugin, ObservableMixin );
  */
 
 /**
- * An array of loaded plugins.
+ * Array of loaded plugins.
  *
  * @typedef {Array.<module:core/plugin~PluginInterface>} module:core/plugin~LoadedPlugins
  */

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

@@ -349,7 +349,7 @@ export default class PluginCollection {
 			 * not to an editor imported from one of the `@ckeditor/ckeditor5-build-*` packages.
 			 *
 			 * Check your import paths and the list of plugins passed to
-			 * {@link #init `PluginCollection.init()`} method
+			 * {@link module:core/editor/editor~Editor.create `Editor.create()`}
 			 * or specified in {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.
 			 *
 			 * The second option is that your `node_modules/` directory contains duplicated versions of the same