ソースを参照

Some related and unrelated API docs improvements. [skip ci]

Piotrek Koszuliński 8 年 前
コミット
e7445d9169

+ 0 - 1
packages/ckeditor5-core/src/command.js

@@ -89,7 +89,6 @@ export default class Command {
 			}
 		} );
 
-		// Forces command#isEnabled value to be false.
 		function forceDisable() {
 			this.isEnabled = false;
 		}

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

@@ -74,7 +74,18 @@ export default class Editor {
 		this.t = this.locale.t;
 
 		/**
-		 * Tree Model document managed by this editor.
+		 * The editor's model document.
+		 *
+		 * The center of the editor's abstract data model. The document contains
+		 * {@link module:engine/model/document~Document#getRoot all editing roots},
+		 * {@link module:engine/model/document~Document#selection} and allows
+		 * applying changes to through the {@link module:engine/model/document~Document#batch batch interface}.
+		 *
+		 * Besides the model document, the editor usually contains two controllers –
+		 * {@link #data data controller} and {@link #editing editing controller}.
+		 * The former is used e.g. when setting or retrieving editor data and contains a useful
+		 * set of methods for operating on the content. The latter controls user input and rendering
+		 * the content for editing.
 		 *
 		 * @readonly
 		 * @member {module:engine/model/document~Document}
@@ -82,7 +93,7 @@ export default class Editor {
 		this.document = new Document();
 
 		/**
-		 * Instance of the {@link module:engine/controller/datacontroller~DataController data controller}.
+		 * The {@link module:engine/controller/datacontroller~DataController data controller}.
 		 *
 		 * @readonly
 		 * @member {module:engine/controller/datacontroller~DataController}
@@ -92,8 +103,8 @@ export default class Editor {
 		/**
 		 * Defines whether this editor is in read-only mode.
 		 *
-		 * In read-only mode the editor {@link module:core/command Commands} are disabled and is not possible
-		 * to modify document using it.
+		 * In read-only mode the editor {@link #commands commands} are disabled so it is not possible
+		 * to modify document using them.
 		 *
 		 * @observable
 		 * @member {Boolean} #isReadOnly
@@ -101,7 +112,7 @@ export default class Editor {
 		this.set( 'isReadOnly', false );
 
 		/**
-		 * Instance of the {@link module:engine/controller/editingcontroller~EditingController editing controller}.
+		 * The {@link module:engine/controller/editingcontroller~EditingController editing controller}.
 		 *
 		 * This property is set by more specialized editor classes (such as {@link module:core/editor/standardeditor~StandardEditor}),
 		 * however, it's required for features to work as their engine-related parts will try to connect converters.

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

@@ -159,7 +159,7 @@ describe( 'Editor', () => {
 	} );
 
 	describe( 'isReadOnly', () => {
-		it( 'is false at default', () => {
+		it( 'is false initially', () => {
 			const editor = new Editor();
 
 			expect( editor.isReadOnly ).to.false;