8
0
Quellcode durchsuchen

Documentation: minor fixes to links in documentation.

Maciej Gołaszewski vor 9 Jahren
Ursprung
Commit
60a03f85e0

+ 6 - 7
packages/ckeditor5-engine/src/treemodel/batch-base.js

@@ -8,6 +8,12 @@
 import CKEditorError from '../ckeditorerror.js';
 
 /**
+ * Creates Batch instance. Not recommended to use directly, use {@link treeModel.Document#batch} instead.
+ *
+ * @param {treeModel.Document} doc Document which this Batch changes.
+ *
+ * @class core.treeModel.Batch
+ * @classdesc
  * The Batch class groups document changes (deltas). All deltas grouped in a single Batch can be
  * reverted together, so you can think about the Batch as a single undo step. If you want to extend one
  * undo step you can call another method on the same Batch object. If you want to create a separate undo step
@@ -28,15 +34,8 @@ import CKEditorError from '../ckeditorerror.js';
  *
  *		doc.batch().insert( firstPosition, 'foo' ).insert( secondPosition, 'bar' );
  *
- * @class core.treeModel.Batch
  */
 export default class Batch {
-	/**
-	 * Creates Batch instance. Not recommended to use directly, use {@link treeModel.Document#batch} instead.
-	 *
-	 * @constructor
-	 * @param {treeModel.Document} doc Document which this Batch changes.
-	 */
 	constructor( doc ) {
 		/**
 		 * Document which this Batch changes.

+ 6 - 6
packages/ckeditor5-engine/src/treemodel/delta/weakinsertdelta.js

@@ -20,18 +20,18 @@ import NodeList from '../nodelist.js';
 export default class WeakInsertDelta extends Delta {}
 
 /**
- * Inserts a node or nodes at the given position. {@link core.treeModel.Batch#weakInsert} is commonly used for actions
+ * Inserts a node or nodes at the given position. {@link core.treeModel.Batch#weakInsert weakInsert} is commonly used for actions
  * like typing or plain-text paste (without formatting). There are two differences between
- * {@link core.treeModel.Batch#insert} and {@link core.treeModel.Batch#weakInsert}:
+ * {@link core.treeModel.Batch#insert insert} and {@link core.treeModel.Batch#weakInsert weakInsert}:
  * * When using `weakInsert`, inserted nodes will have same attributes as the current attributes of
  * {@link core.treeModel.Document#selection document selection}.
  * * The above has to be reflected during {@link core.treeModel.operation.transform operational transformation}. Normal
- * behavior is that inserting inside range changed by {@link core.treeModel.operation.AttributeOperation} splits the operation
- * into two operations, which "omit" the inserted nodes. The correct behavior for `WeakInsertDelta` is that
- * {@link core.treeModel.operation.AttributeOperation} does not "break" and also applies attributes for inserted nodes.
+ * behavior is that inserting inside range changed by {@link core.treeModel.operation.AttributeOperation AttributeOperation} splits
+ * the operation into two operations, which "omit" the inserted nodes. The correct behavior for `WeakInsertDelta` is that
+ * {@link core.treeModel.operation.AttributeOperation AttributeOperation} does not "break" and also applies attributes for inserted nodes.
  *
  * @chainable
- * @method core.treeModel.BatchweakInsert
+ * @method core.treeModel.Batch#weakInsert
  * @param {core.treeModel.Position} position Position of insertion.
  * @param {core.treeModel.NodeSet} nodes The list of nodes to be inserted.
  */

+ 21 - 15
packages/ckeditor5-engine/src/treeview/treeview.js

@@ -12,31 +12,30 @@ import Converter from './converter.js';
 import utils from '../utils.js';
 
 /**
+ * Creates a TreeView based on the HTMLElement.
+ *
+ * The constructor copies the element name and attributes to create the
+ * root of the view, but does not copy its children. This means that the while rendering, the whole content of this
+ * root element will be removed when you call {@link core.treeView.TreeView#render render} but the root name and attributes will
+ * be preserved.
+ *
+ * @param {HTMLElement} domRoot DOM element in which the tree view should do change.
+ * @class core.treeView.TreeView
+ * @classdesc
  * TreeView class combines the actual tree of view elements, tree of DOM elements, {@link core.treeView.Converter converter},
  * {@link core.treeView.Renderer renderer} and all {@link core.treeView.Observer observers}. It creates an abstract layer over the
  * content editable area.
  *
- * If you want to only transform the tree of view elements to the DOM elements you can use the {@link core.treeView.Converter}.
+ * If you want to only transform the tree of view elements to the DOM elements you can use the {@link core.treeView.Converter Converter}.
  *
- * @mixins EmitterMixin
- * @class core.treeView.TreeView
+ * @mixes core.EmitterMixin
  */
 export default class TreeView {
-	/**
-	 * Creates a TreeView based on the HTMLElement.
-	 *
-	 * The constructor copies the element name and attributes to create the
-	 * root of the view, but does not copy its children. This means that the while rendering, the whole content of this
-	 * root element will be removed when you call {@link core.treeView.TreeView#render} but the root name and attributes will
-	 * be preserved.
-	 *
-	 * @param {HTMLElement} domRoot DOM element in which the tree view should do change.
-	 * @constructor
-	 */
 	constructor( domRoot ) {
 		/**
 		 * Root of the DOM tree.
 		 *
+		 * @member core.treeView.TreeView#domRoot
 		 * @type {HTMLElement}
 		 */
 		this.domRoot = domRoot;
@@ -44,7 +43,8 @@ export default class TreeView {
 		/**
 		 * Set of {@link core.treeView.Observer observers}.
 		 *
-		 * @type {Set.<treeView.Observer>}
+		 * @member core.treeView.TreeView#observers
+		 * @type {Set.<core.treeView.Observer>}
 		 */
 		this.observers = new Set();
 
@@ -52,6 +52,7 @@ export default class TreeView {
 		 * Instance of the {@link core.treeView.Converter converter} use by {@link core.treeView.TreeView#renderer renderer} and
 		 * {@link core.treeView.TreeView#observers observers}.
 		 *
+		 * @member core.treeView.TreeView#converter
 		 * @type {core.treeView.Converter}
 		 */
 		this.converter = new Converter();
@@ -59,6 +60,7 @@ export default class TreeView {
 		/**
 		 * Root of the view tree.
 		 *
+		 * @member core.treeView.TreeView#viewRoot
 		 * @type {core.treeView.Element}
 		 */
 		this.viewRoot = this.converter.domToView( domRoot, { bind: true, withChildren: false } );
@@ -67,6 +69,7 @@ export default class TreeView {
 		/**
 		 * Instance of the {@link core.treeView.TreeView#renderer renderer}.
 		 *
+		 * @member core.treeView.TreeView#renderer
 		 * @type {core.treeView.Renderer}
 		 */
 		this.renderer = new Renderer( this.converter );
@@ -82,6 +85,7 @@ export default class TreeView {
 	 * Adds an observer to the set of observers. This method also {@link core.treeView.Observer#init initializes} and
 	 * {@link core.treeView.Observer#attach attaches} the observer.
 	 *
+	 * @method core.treeView.TreeView#addObserver
 	 * @param {treeView.Observer} observer Observer to add.
 	 */
 	addObserver( observer ) {
@@ -93,6 +97,8 @@ export default class TreeView {
 	/**
 	 * Renders all changes. In order to avoid triggering the observers (e.g. mutations) all observers all detached
 	 * before rendering and reattached after that.
+	 *
+	 * @method core.treeView.TreeView#render
 	 */
 	render() {
 		for ( let observer of this.observers ) {