Forráskód Böngészése

Docs: Minor improvements.

Oskar Wróbel 8 éve
szülő
commit
15b332a6c6

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

@@ -11,7 +11,7 @@ import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler';
 
 /**
  * A keystroke handler for editor editing. Its instance is available
- * in {@link module:core/editor/standardeditor~StandardEditor#keystrokes} so plugins
+ * in {@link module:core/editor/editor~Editor#keystrokes} so plugins
  * can register their keystrokes.
  *
  * E.g. an undo plugin would do this:

+ 4 - 0
packages/ckeditor5-core/tests/_utils/classictesteditor.js

@@ -26,8 +26,10 @@ export default class ClassicTestEditor extends Editor {
 	constructor( element, config ) {
 		super( config );
 
+		// The element on which the editor has been initialized.
 		this.element = element;
 
+		// Use the HTML data processor in this editor.
 		this.data.processor = new HtmlDataProcessor();
 
 		this.ui = new ClassicTestEditorUI( this, new BoxedEditorUIView( this.locale ) );
@@ -37,8 +39,10 @@ export default class ClassicTestEditor extends Editor {
 		this.ui.view.main.add( this.ui.view.editable );
 		this.ui.view.editableElement = this.ui.view.editable.element;
 
+		// A helper to easily replace the editor#element with editor.editable#element.
 		this._elementReplacer = new ElementReplacer();
 
+		// Create the ("main") root element of the model tree.
 		this.model.document.createRoot();
 	}
 

+ 3 - 3
packages/ckeditor5-core/tests/_utils/modeltesteditor.js

@@ -20,20 +20,20 @@ export default class ModelTestEditor extends Editor {
 	constructor( config ) {
 		super( config );
 
+		// Use the HTML data processor in this editor.
 		this.data.processor = new HtmlDataProcessor();
 
 		// Disable editing pipeline for model editor.
 		this.editing.destroy();
-		this.editing.view.roots.clear();
 
-		// Create main root.
+		// Create the ("main") root element of the model tree.
 		this.model.document.createRoot();
 	}
 
 	/**
 	 * Creates a virtual, element-less editor instance.
 	 *
-	 * @param {Object} config See {@link core.editor.StandardEditor}'s param.
+	 * @param {Object} config See {@link core.editor.Editor}'s param.
 	 * @returns {Promise} Promise resolved once editor is ready.
 	 * @returns {core.editor.VirtualTestEditor} return.editor The editor instance.
 	 */

+ 3 - 1
packages/ckeditor5-core/tests/_utils/virtualtesteditor.js

@@ -20,15 +20,17 @@ export default class VirtualTestEditor extends Editor {
 	constructor( config ) {
 		super( config );
 
+		// Use the HTML data processor in this editor.
 		this.data.processor = new HtmlDataProcessor();
 
+		// Create the ("main") root element of the model tree.
 		this.model.document.createRoot();
 	}
 
 	/**
 	 * Creates a virtual, element-less editor instance.
 	 *
-	 * @param {Object} config See {@link core.editor.StandardEditor}'s param.
+	 * @param {Object} config See {@link core.editor.Editor}'s param.
 	 * @returns {Promise} Promise resolved once editor is ready.
 	 * @returns {core.editor.VirtualTestEditor} return.editor The editor instance.
 	 */