瀏覽代碼

API docs corrections.

Piotrek Koszuliński 9 年之前
父節點
當前提交
dd8e1874c2
共有 3 個文件被更改,包括 15 次插入7 次删除
  1. 8 0
      src/creator/standardcreator.js
  2. 3 3
      src/editablecollection.js
  3. 4 4
      src/editor.js

+ 8 - 0
src/creator/standardcreator.js

@@ -18,6 +18,14 @@ import EditingController from '../engine/treecontroller/editingcontroller.js';
  * @extends ckeditor5.creator.Creator
  */
 export default class StandardCreator extends Creator {
+	/**
+	 * Creates an instance of the standard creator. Initializes the engine ({@link engine.treeModel.Document document},
+	 * {@link engine.treeController.EditingController editing controller} and
+	 * {@link engine.treeController.DataController data controller}).
+	 *
+	 * @param {ckeditor5.Editor} The editor instance.
+	 * @param {engine.dataProcessor.DataProcessor} The data processor to use.
+	 */
 	constructor( editor, dataProcessor ) {
 		super( editor );
 

+ 3 - 3
src/editablecollection.js

@@ -18,7 +18,7 @@ import ObservableMixin from './utils/observablemixin.js';
  */
 export default class EditableCollection extends Collection {
 	/**
-	 * Creates a new instance of Editabe.
+	 * Creates a new instance of EditableCollection.
 	 */
 	constructor() {
 		super( { idProperty: 'name' } );
@@ -26,8 +26,8 @@ export default class EditableCollection extends Collection {
 		/**
 		 * The currently focused editable.
 		 *
-		 * @observable
 		 * @readonly
+		 * @observable
 		 * @member {ckeditor5.Editable} ckeditor5.EditableCollection#current
 		 */
 		this.set( 'current', null );
@@ -44,7 +44,7 @@ export default class EditableCollection extends Collection {
 	}
 
 	/**
-	 * Destorys the collection.
+	 * Destroys the collection.
 	 */
 	destroy() {
 		this.stopListening();

+ 4 - 4
src/editor.js

@@ -243,7 +243,7 @@ export default class Editor {
 	}
 
 	/**
-	 * Sets the data in the specified editor editable root.
+	 * Sets the data in the specified editor's editable root.
 	 *
 	 * @param {*} data The data to load.
 	 * @param {String} [editableRootName] The name of the editable root to which the data should be loaded.
@@ -265,7 +265,7 @@ export default class Editor {
 	}
 
 	/**
-	 * Gets the data from the specified editor editable root.
+	 * Gets the data from the specified editor's editable root.
 	 *
 	 * @param {String} [editableRootName] The name of the editable root to get the data from.
 	 * If not specified and if there's only one editable root added to the editor, then the data will be retrieved
@@ -301,7 +301,7 @@ export default class Editor {
 	}
 
 	/**
-	 * Returns name of the root editable if there is only one. If there are multiple or no root editables, throws an error.
+	 * Returns name of the editable root if there is only one. If there are multiple or no editable roots, throws an error.
 	 *
 	 * Note: The error message makes sense only for methods like {@link ckeditor5.Editor#setData} and
 	 * {@link ckeditor5.Editor#getData}.
@@ -314,7 +314,7 @@ export default class Editor {
 
 		if ( rootNames.length > 1 ) {
 			/**
-			 * The name of the root editable must be specified. There are multiple root editables added to the editor,
+			 * The name of the editable root must be specified. There are multiple editable roots added to the editor,
 			 * so the name of the editable must be specified.
 			 *
 			 * @error editor-editable-root-name-missing