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

Docs: aligning to new format, fixed event refs.

Maciek 9 éve
szülő
commit
6c2000dc00
50 módosított fájl, 248 hozzáadás és 260 törlés
  1. 8 8
      packages/ckeditor5-engine/src/controller/datacontroller.js
  2. 0 1
      packages/ckeditor5-engine/src/controller/deletecontent.js
  3. 6 3
      packages/ckeditor5-engine/src/controller/getselectedcontent.js
  4. 1 1
      packages/ckeditor5-engine/src/controller/insertcontent.js
  5. 0 1
      packages/ckeditor5-engine/src/controller/modifyselection.js
  6. 1 1
      packages/ckeditor5-engine/src/conversion/buildmodelconverter.js
  7. 3 2
      packages/ckeditor5-engine/src/conversion/buildviewconverter.js
  8. 1 1
      packages/ckeditor5-engine/src/conversion/mapper.js
  9. 1 1
      packages/ckeditor5-engine/src/conversion/model-to-view-converters.js
  10. 9 7
      packages/ckeditor5-engine/src/conversion/modelconversiondispatcher.js
  11. 2 2
      packages/ckeditor5-engine/src/conversion/view-selection-to-model-converters.js
  12. 1 1
      packages/ckeditor5-engine/src/conversion/view-to-model-converters.js
  13. 13 13
      packages/ckeditor5-engine/src/conversion/viewconversiondispatcher.js
  14. 1 9
      packages/ckeditor5-engine/src/dev-utils/model.js
  15. 3 11
      packages/ckeditor5-engine/src/dev-utils/view.js
  16. 2 2
      packages/ckeditor5-engine/src/model/delta/delta.js
  17. 1 1
      packages/ckeditor5-engine/src/model/delta/insertdelta.js
  18. 1 1
      packages/ckeditor5-engine/src/model/delta/mergedelta.js
  19. 1 1
      packages/ckeditor5-engine/src/model/delta/splitdelta.js
  20. 3 11
      packages/ckeditor5-engine/src/model/delta/transform.js
  21. 1 1
      packages/ckeditor5-engine/src/model/delta/weakinsertdelta.js
  22. 14 14
      packages/ckeditor5-engine/src/model/document.js
  23. 1 1
      packages/ckeditor5-engine/src/model/documentfragment.js
  24. 3 3
      packages/ckeditor5-engine/src/model/element.js
  25. 1 1
      packages/ckeditor5-engine/src/model/model.jsdoc
  26. 2 2
      packages/ckeditor5-engine/src/model/node.js
  27. 1 1
      packages/ckeditor5-engine/src/model/nodelist.js
  28. 1 1
      packages/ckeditor5-engine/src/model/operation/insertoperation.js
  29. 1 1
      packages/ckeditor5-engine/src/model/operation/transform.js
  30. 2 2
      packages/ckeditor5-engine/src/model/position.js
  31. 1 0
      packages/ckeditor5-engine/src/model/range.js
  32. 32 28
      packages/ckeditor5-engine/src/model/selection.js
  33. 1 1
      packages/ckeditor5-engine/src/model/text.js
  34. 2 2
      packages/ckeditor5-engine/src/model/treewalker.js
  35. 2 2
      packages/ckeditor5-engine/src/model/writer.js
  36. 4 4
      packages/ckeditor5-engine/src/view/document.js
  37. 1 1
      packages/ckeditor5-engine/src/view/element.js
  38. 32 28
      packages/ckeditor5-engine/src/view/node.js
  39. 2 2
      packages/ckeditor5-engine/src/view/observer/clickobserver.js
  40. 2 2
      packages/ckeditor5-engine/src/view/observer/fakeselectionobserver.js
  41. 4 3
      packages/ckeditor5-engine/src/view/observer/focusobserver.js
  42. 3 3
      packages/ckeditor5-engine/src/view/observer/keyobserver.js
  43. 19 21
      packages/ckeditor5-engine/src/view/observer/mutationobserver.js
  44. 4 4
      packages/ckeditor5-engine/src/view/observer/selectionobserver.js
  45. 5 7
      packages/ckeditor5-engine/src/view/range.js
  46. 15 14
      packages/ckeditor5-engine/src/view/renderer.js
  47. 30 29
      packages/ckeditor5-engine/src/view/selection.js
  48. 2 2
      packages/ckeditor5-engine/src/view/text.js
  49. 1 1
      packages/ckeditor5-engine/src/view/view.jsdoc
  50. 1 1
      packages/ckeditor5-engine/src/view/writer.js

+ 8 - 8
packages/ckeditor5-engine/src/controller/datacontroller.js

@@ -52,7 +52,7 @@ export default class DataController {
 		 * Document model.
 		 *
 		 * @readonly
-		 * @member {module:module:engine/model/document~Document}
+		 * @member {module:engine/model/document~Document}
 		 */
 		this.model = model;
 
@@ -209,7 +209,7 @@ export default class DataController {
 	 * @param {String} data Data to parse.
 	 * @param {String} [context='$root'] Base context in which view will be converted to the model. See:
 	 * {@link module:engine/conversion/viewconversiondispatcher~ViewConversionDispatcher#convert}.
-	 * @returns {module:module:engine/model/documentfragment~DocumentFragment} Parsed data.
+	 * @returns {module:engine/model/documentfragment~DocumentFragment} Parsed data.
 	 */
 	parse( data, context = '$root' ) {
 		// data -> view
@@ -269,11 +269,11 @@ export default class DataController {
 	}
 
 	/**
-	 * See {@link engine.controller.getSelectedContent}.
+	 * See {@link module:engine/controller/getselectedcontent~getSelectedContent}.
 	 *
 	 * @fires engine.controller.DataController#getSelectedContent
-	 * @param {engine.model.Selection} selection The selection of which content will be retrieved.
-	 * @returns {engine.model.DocumentFragment} Document fragment holding the clone of the selected content.
+	 * @param {module:engine/model/selection~Selection} selection The selection of which content will be retrieved.
+	 * @returns {module:engine/model/documentfragment~DocumentFragment} Document fragment holding the clone of the selected content.
 	 */
 	getSelectedContent( selection ) {
 		const evtData = { selection };
@@ -323,12 +323,12 @@ mix( DataController, EmitterMixin );
 
 /**
  * Event fired when {@link engine.controller.DataController#getSelectedContent} method is called.
- * The {@link engine.controller.getSelectedContent default action of that method} is implemented as a
+ * The {@link module:engine/controller/getselectedcontent~getSelectedContent default action of that method} is implemented as a
  * listener to this event so it can be fully customized by the features.
  *
  * @event engine.controller.DataController#getSelectedContent
  * @param {Object} data
- * @param {engine.model.Selection} data.selection
- * @param {engine.model.DocumentFragment} data.content The document fragment to return
+ * @param {module:engine/model/selection~Selection} data.selection
+ * @param {module:engine/model/documentfragment~DocumentFragment} data.content The document fragment to return
  * (holding a clone of the selected content).
  */

+ 0 - 1
packages/ckeditor5-engine/src/controller/deletecontent.js

@@ -15,7 +15,6 @@ import compareArrays from '../../utils/comparearrays.js';
 /**
  * Deletes content of the selection and merge siblings. The resulting selection is always collapsed.
  *
- * @method engine.controller.deleteContent
  * @param {module:engine/model/selection~Selection} selection Selection of which the content should be deleted.
  * @param {module:engine/model/batch~Batch} batch Batch to which the deltas will be added.
  * @param {Object} [options]

+ 6 - 3
packages/ckeditor5-engine/src/controller/getselectedcontent.js

@@ -3,6 +3,10 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module engine/controller/getselectedcontent
+ */
+
 import DocumentFragment from '../model/documentfragment.js';
 import Range from '../model/range.js';
 import Position from '../model/position.js';
@@ -21,9 +25,8 @@ import { remove } from '../model/writer.js';
  *
  *		<quote><h>st</h></quote><p>se</p>
  *
- * @method engine.controller.getSelectedContent
- * @param {engine.model.Selection} selection The selection of which content will be returned.
- * @returns {engine.model.DocumentFragment}
+ * @param {module:engine/model/selection~Selection} selection The selection of which content will be returned.
+ * @returns {module:engine/model/documentfragment~DocumentFragment}
  */
 export default function getSelectedContent( selection ) {
 	const frag = new DocumentFragment();

+ 1 - 1
packages/ckeditor5-engine/src/controller/insertcontent.js

@@ -77,7 +77,7 @@ class Insertion {
 		/**
 		 * The position at which (or near which) the next node will be inserted.
 		 *
-		 * @member {module:module:engine/model/position~Position~Position} #position
+		 * @member {module:engine/model/position~Position} #position
 		 */
 		this.position = position;
 

+ 0 - 1
packages/ckeditor5-engine/src/controller/modifyselection.js

@@ -33,7 +33,6 @@ import { isInsideSurrogatePair, isInsideCombinedSymbol } from '../../utils/unico
  *
  * **Note:** if you extend a forward selection in a backward direction you will in fact shrink it.
  *
- * @method engine.controller.modifySelection
  * @param {module:engine/model/selection~Selection} selection The selection to modify.
  * @param {Object} [options]
  * @param {'forward'|'backward'} [options.direction='forward'] The direction in which the selection should be modified.

+ 1 - 1
packages/ckeditor5-engine/src/conversion/buildmodelconverter.js

@@ -190,7 +190,7 @@ class ModelConverterBuilder {
 	 * This method creates the converter and adds it as a callback to a proper
 	 * {@link module:engine/conversion/modelconversiondispatcher~ModelConversionDispatcher conversion dispatcher} event.
 	 *
-	 * @param {String|module:engine/view/viewelement~ViewElement|Function} element Element created by converter.
+	 * @param {String|module:engine/view/element~Element|Function} element Element created by converter.
 	 */
 	toElement( element ) {
 		const priority = this._from.priority === null ? 'normal' : this._from.priority;

+ 3 - 2
packages/ckeditor5-engine/src/conversion/buildviewconverter.js

@@ -19,7 +19,8 @@ import isIterable from '../../utils/isiterable.js';
  * HTML content to the editor. Then, converters are used to translate this structure, possibly removing unknown/incorrect
  * nodes, and add it to the model. Also multiple, different elements might be translated into the same thing in the
  * model, i.e. `<b>` and `<strong>` elements might be converted to `bold` attribute (even though `bold` attribute will
- * be then converted only to `<strong>` tag). Instances of this class are created by {@link engine.conversion.buildViewConverter}.
+ * be then converted only to `<strong>` tag). Instances of this class are created by
+ * {@link module:engine/conversion/buildviewconverter~buildViewConverter}.
  *
  * If you need more complex converters, see {@link module:engine/conversion/viewconversiondispatcher~ViewConversionDispatcher},
  * {@link module:engine/conversion/view-to-model-converters~viewToModel}, {@link module:engine/conversion/viewconsumable~ViewConsumable}.
@@ -416,7 +417,7 @@ function setAttributeOn( toChange, attribute, data, conversionApi ) {
  * view-to-model converters and attach them to provided dispatchers. The method returns an instance of
  * {@link module:engine/conversion/buildviewconverter~ViewConverterBuilder}.
  *
- * @external engine.conversion.buildViewConverter
+ * @external module:engine/conversion/buildviewconverter~buildViewConverter
  */
 export default function buildViewConverter() {
 	return new ViewConverterBuilder();

+ 1 - 1
packages/ckeditor5-engine/src/conversion/mapper.js

@@ -18,7 +18,7 @@ import EmitterMixin from '../../utils/emittermixin.js';
 import mix from '../../utils/mix.js';
 
 /**
- * Maps elements and positions between {@link module:engine/view/document~Document view} and {@link module:engine/model model}.
+ * Maps elements and positions between {@link module:engine/view/document~Document view} and {@link module:engine/model/model model}.
  *
  * Mapper use bound elements to find corresponding elements and positions, so, to get proper results,
  * all model elements should be {@link module:engine/conversion/mapper~Mapper#bindElements bound}.

+ 1 - 1
packages/ckeditor5-engine/src/conversion/model-to-view-converters.js

@@ -19,7 +19,7 @@ import ViewTreeWalker from '../view/treewalker.js';
 import viewWriter from '../view/writer.js';
 
 /**
- * Contains {@link module:engine/model model} to {@link module:engine/view view} converters for
+ * Contains {@link module:engine/model/model model} to {@link module:engine/view/view view} converters for
  * {@link module:engine/conversion/modelconversiondispatcher~ModelConversionDispatcher}.
  *
  * @namespace module:engine/conversion/modeltoview~modelToView

+ 9 - 7
packages/ckeditor5-engine/src/conversion/modelconversiondispatcher.js

@@ -15,9 +15,9 @@ import mix from '../../utils/mix.js';
 import extend from '../../utils/lib/lodash/extend.js';
 
 /**
- * `ModelConversionDispatcher` is a central point of {@link module:engine/model model} conversion, which is
+ * `ModelConversionDispatcher` is a central point of {@link module:engine/model/model model} conversion, which is
  * a process of reacting to changes in the model and reflecting them by listeners that listen to those changes.
- * In default application, {@link module:engine/model model} is converted to {@link module:engine/view view}. This means
+ * In default application, {@link module:engine/model/model model} is converted to {@link module:engine/view/view view}. This means
  * that changes in the model are reflected by changing the view (i.e. adding view nodes or changing attributes on view elements).
  *
  * During conversion process, `ModelConversionDispatcher` fires data-manipulation events, basing on state of the model and prepares
@@ -27,18 +27,19 @@ import extend from '../../utils/lib/lodash/extend.js';
  * and not the structure itself, there is a need to have a mapping between model and the structure on which changes are
  * reflected. To map elements during model to view conversion use {@link module:engine/conversion/mapper~Mapper}.
  *
- * The main use for this class is to listen to {@link module:engine/model/document~Document.change Document change event}, process it
+ * The main use for this class is to listen to {@link module:engine/model/document~Document#event:change Document change event}, process it
  * and then fire specific events telling what exactly has changed. For those events, `ModelConversionDispatcher`
  * creates {@link module:engine/conversion/modelconsumable~ModelConsumable list of consumable values} that should be handled by event
  * callbacks. Those events are listened to by model-to-view converters which convert changes done in the
- * {@link module:engine/model model} to changes in the {@link module:engine/view view}. `ModelConversionController` also checks
+ * {@link module:engine/model/model model} to changes in the {@link module:engine/view/view view}. `ModelConversionController` also checks
  * the current state of consumables, so it won't fire events for parts of model that were already consumed. This is
  * especially important in callbacks that consume multiple values. See {@link module:engine/conversion/modelconsumable~ModelConsumable}
  * for an example of such callback.
  *
  * Although the primary usage for this class is the model-to-view conversion, `ModelConversionDispatcher` can be used
  * to build custom data processing pipelines that converts model to anything that is needed. Existing model structure can
- * be used to generate events (listening to {@link module:engine/model/document~Document.change Document change event} is not required)
+ * be used to generate events (listening to {@link module:engine/model/document~Document#event:change Document change event} is not
+ * required)
  * and custom callbacks can be added to the events (these does not have to be limited to changes in the view).
  *
  * When providing your own event listeners for `ModelConversionDispatcher` keep in mind that any callback that had
@@ -122,9 +123,10 @@ export default class ModelConversionDispatcher {
 	/**
 	 * Prepares data and fires a proper event.
 	 *
-	 * The method is crafted to take use of parameters passed in {@link module:engine/model/document~Document.change Document change event}.
+	 * The method is crafted to take use of parameters passed in {@link module:engine/model/document~Document#event:change Document change
+	 * event}.
 	 *
-	 * @see module:engine/model/document~Document.change
+	 * @see module:engine/model/document~Document#event:change
 	 * @fires insert
 	 * @fires move
 	 * @fires remove

+ 2 - 2
packages/ckeditor5-engine/src/conversion/view-selection-to-model-converters.js

@@ -19,7 +19,7 @@ import ModelSelection from '../model/selection.js';
 
 /**
  * Function factory, creates a callback function which converts a {@link module:engine/view/selection~Selection view selection} taken
- * from the {@link module:engine/view/document~Document#selectionChange} event
+ * from the {@link module:engine/view/document~Document#event:selectionChange} event
  * and sets in on the {@link module:engine/model/document~Document#selection model}.
  *
  * **Note**: because there is no view selection change dispatcher nor any other advanced view selection to model
@@ -29,7 +29,7 @@ import ModelSelection from '../model/selection.js';
  *
  * @param {module:engine/model/document~Document} modelDocument Model document on which selection should be updated.
  * @param {module:engine/conversion/mapper~Mapper} mapper Conversion mapper.
- * @returns {Function} {@link module:engine/view/document~Document#selectionChange} callback function.
+ * @returns {Function} {@link module:engine/view/document~Document#event:selectionChange} callback function.
  */
 export function convertSelectionChange( modelDocument, mapper ) {
 	return ( evt, data ) => {

+ 1 - 1
packages/ckeditor5-engine/src/conversion/view-to-model-converters.js

@@ -12,7 +12,7 @@ import ModelText from '../model/text.js';
 import { normalizeNodes } from '../model/writer.js';
 
 /**
- * Contains {@link module:engine/view view} to {@link module:engine/model model} converters for
+ * Contains {@link module:engine/view/view view} to {@link module:engine/model/model model} converters for
  * {@link module:engine/conversion/viewconversiondispatcher~ViewConversionDispatcher}.
  *
  * @namespace viewToModel

+ 13 - 13
packages/ckeditor5-engine/src/conversion/viewconversiondispatcher.js

@@ -15,10 +15,10 @@ import mix from '../../utils/mix.js';
 import extend from '../../utils/lib/lodash/extend.js';
 
 /**
- * `ViewConversionDispatcher` is a central point of {@link module:engine/view view} conversion, which is a process of
+ * `ViewConversionDispatcher` is a central point of {@link module:engine/view/view view} conversion, which is a process of
  * converting given {@link module:engine/view/documentfragment~DocumentFragment view document fragment} or
  * {@link module:engine/view/element~Element}
- * into another structure. In default application, {@link module:engine/view view} is converted to {@link engine.model}.
+ * into another structure. In default application, {@link module:engine/view/view view} is converted to {@link module:engine/model/model}.
  *
  * During conversion process, for all {@link module:engine/view/node~Node view nodes} from the converted view document fragment,
  * `ViewConversionDispatcher` fires corresponding events. Special callbacks called "converters" should listen to
@@ -102,7 +102,7 @@ export default class ViewConversionDispatcher {
 	/**
 	 * Creates a `ViewConversionDispatcher` that operates using passed API.
 	 *
-	 * @see engine.conversion.ViewConversionApi
+	 * @see module:engine/conversion/viewconversiondispatcher~ViewConversionApi
 	 * @param {Object} [conversionApi] Additional properties for interface that will be passed to events fired
 	 * by `ViewConversionDispatcher`.
 	 */
@@ -110,7 +110,7 @@ export default class ViewConversionDispatcher {
 		/**
 		 * Interface passed by dispatcher to the events callbacks.
 		 *
-		 * @member {engine.conversion.ViewConversionApi}
+		 * @member {module:engine/conversion/viewconversiondispatcher~ViewConversionApi}
 		 */
 		this.conversionApi = extend( {}, conversionApi );
 
@@ -129,7 +129,7 @@ export default class ViewConversionDispatcher {
 	 * @param {module:engine/view/documentfragment~DocumentFragment|module:engine/view/element~Element}
 	 * viewItem Part of the view to be converted.
 	 * @param {Object} [additionalData] Additional data to be passed in `data` argument when firing `ViewConversionDispatcher`
-	 * events. See also {@link #element element event}.
+	 * events. See also {@link #event:element element event}.
 	 * @returns {module:engine/model/documentfragment~DocumentFragment} Model document fragment that is a result of the conversion process.
 	 */
 	convert( viewItem, additionalData = {} ) {
@@ -142,7 +142,7 @@ export default class ViewConversionDispatcher {
 
 	/**
 	 * @private
-	 * @see engine.conversion.ViewConversionApi#convertItem
+	 * @see module:engine/conversion/viewconversiondispatcher~ViewConversionApi#convertItem
 	 */
 	_convertItem( input, consumable, additionalData = {} ) {
 		const data = extend( {}, additionalData, {
@@ -163,7 +163,7 @@ export default class ViewConversionDispatcher {
 
 	/**
 	 * @private
-	 * @see engine.conversion.ViewConversionApi#convertChildren
+	 * @see module:engine/conversion/viewconversiondispatcher~ViewConversionApi#convertChildren
 	 */
 	_convertChildren( input, consumable, additionalData = {} ) {
 		const viewChildren = Array.from( input.getChildren() );
@@ -176,7 +176,7 @@ export default class ViewConversionDispatcher {
 	/**
 	 * Fired before the first conversion event, at the beginning of view to model conversion process.
 	 *
-	 * @event module:engine/conversion/viewconversiondispatcher~ViewConversionDispatcher#viewCleanup
+	 * @event viewCleanup
 	 * @param {module:engine/view/documentfragment~DocumentFragment|module:engine/view/element~Element}
 	 * viewItem Part of the view to be converted.
 	 */
@@ -188,9 +188,9 @@ export default class ViewConversionDispatcher {
 	 * `element:<elementName>` where `elementName` is the name of converted element. This way listeners may listen to
 	 * all elements conversion or to conversion of specific elements.
 	 *
-	 * @event module:engine/conversion/viewconversiondispatcher~ViewConversionDispatcher#element
+	 * @event element
 	 * @param {Object} data Object containing conversion input and a placeholder for conversion output and possibly other
-	 * values (see {@link module:engine/conversion/viewconversiondispatcher~ViewConversionDispatcher#convert}).
+	 * values (see {@link #convert}).
 	 * Keep in mind that this object is shared by reference between all callbacks that will be called.
 	 * This means that callbacks can add their own values if needed,
 	 * and those values will be available in other callbacks.
@@ -201,7 +201,7 @@ export default class ViewConversionDispatcher {
 	 * @param {module:engine/conversion/viewconsumable~ViewConsumable} consumable Values to consume.
 	 * @param {Object} conversionApi Conversion interface to be used by callback, passed in `ViewConversionDispatcher` constructor.
 	 * Besides of properties passed in constructor, it also has `convertItem` and `convertChildren` methods which are references
-	 * to {@link module:engine/conversion/viewconversiondispatcher~ViewConversionDispatcher#_convertItem} and
+	 * to {@link #_convertItem} and
 	 * {@link ~ViewConversionDispatcher#_convertChildren}. Those methods are needed to convert
 	 * the whole view-tree they were exposed in `conversionApi` for callbacks.
 	 */
@@ -248,7 +248,7 @@ mix( ViewConversionDispatcher, EmitterMixin );
  * input Item to convert.
  * @param {module:engine/conversion/viewconsumable~ViewConsumable} consumable Values to consume.
  * @param {Object} [additionalData] Additional data to be passed in `data` argument when firing `ViewConversionDispatcher`
- * events. See also {@link module:engine/conversion/viewconversiondispatcher~ViewConversionDispatcher#element element event}.
+ * events. See also {@link #event:element element event}.
  * @returns {*} The result of item conversion, created and modified by callbacks attached to fired event.
  */
 
@@ -263,6 +263,6 @@ mix( ViewConversionDispatcher, EmitterMixin );
  * input Item which children will be converted.
  * @param {module:engine/conversion/viewconsumable~ViewConsumable} consumable Values to consume.
  * @param {Object} [additionalData] Additional data to be passed in `data` argument when firing `ViewConversionDispatcher`
- * events. See also {@link module:engine/conversion/viewconversiondispatcher~ViewConversionDispatcher#element element event}.
+ * events. See also {@link #event:element element event}.
  * @returns {Array.<*>} Array containing results of conversion of all children of given item.
  */

+ 1 - 9
packages/ckeditor5-engine/src/dev-utils/model.js

@@ -8,11 +8,7 @@
  */
 
 /**
- * @namespace model
- */
-
-/**
- * Collection of methods for manipulating {@link engine.model engine.model} for testing purposes.
+ * Collection of methods for manipulating {@link module:engine/model/model model} for testing purposes.
  */
 
 import RootElement from '../model/rootelement.js';
@@ -50,7 +46,6 @@ import isPlainObject from '../../utils/lib/lodash/isPlainObject.js';
  *
  *		<$text attribute="value">Text data</$text>
  *
- * @method module:engine/dev-utils/model~model.getData
  * @param {module:engine/model/document~Document} document
  * @param {Object} [options]
  * @param {Boolean} [options.withoutSelection=false] Whether to write the selection. When set to `true` selection will
@@ -84,7 +79,6 @@ getData._stringify = stringify;
  *
  *		<$text attribute="value">Text data</$text>
  *
- * @method module:engine/dev-utils/model~model.setData
  * @param {module:engine/model/document~Document} document
  * @param {String} data HTML-like string to write into Document.
  * @param {Object} options
@@ -171,7 +165,6 @@ setData._parse = parse;
  *
  *		<$text attribute="value">Text data</$text>
  *
- * @method module:engine/dev-utils/model~model.stringify
  * @param {module:engine/model/rootelement~RootElement|module:engine/model/element~Element|module:engine/model/text~Text|
  * module:engine/model/documentfragment~DocumentFragment} node Node to stringify.
  * @param {module:engine/model/selection~Selection|module:engine/model/position~Position|module:engine/model/range~Range}
@@ -260,7 +253,6 @@ export function stringify( node, selectionOrPositionOrRange = null ) {
  *
  *		<$text attribute="value">Text data</$text>
  *
- * @method module:engine/dev-utils/model~model.parse
  * @param {String} data HTML-like string to be parsed.
  * @param {module:engine/model/schema~Schema} schema Schema instance uses by converters for element validation.
  * @param {Object} options Additional configuration.

+ 3 - 11
packages/ckeditor5-engine/src/dev-utils/view.js

@@ -8,11 +8,7 @@
  */
 
 /**
- * @namespace module:engine/dev-utils/view~View
- */
-
-/**
- * Collection of methods for manipulating {@link engine.view engine.view} for testing purposes.
+ * Collection of methods for manipulating {@link module:engine/view/view view} for testing purposes.
  */
 
 import Document from '../view/document.js';
@@ -40,7 +36,6 @@ const allowedTypes = {
 /**
  * Writes the contents of the {@link module:engine/view/document~Document Document} to an HTML-like string.
  *
- * @method module:engine/dev-utils/view~View.getData
  * @param {module:engine/view/document~Document} document
  * @param {Object} [options]
  * @param {Boolean} [options.withoutSelection=false] Whether to write the selection. When set to `true` selection will
@@ -78,7 +73,6 @@ getData._stringify = stringify;
 /**
  * Sets the contents of the {@link module:engine/view/document~Document Document} provided as HTML-like string.
  *
- * @method module:engine/dev-utils/view~View.setData
  * @param {module:engine/view/document~Document} document
  * @param {String} data HTML-like string to write into Document.
  * @param {Object} options
@@ -173,8 +167,8 @@ setData._parse = parse;
  * Additional options object can be provided.
  * If `options.showType` is set to `true`, element's types will be
  * presented for {@link module:engine/view/attributeelement~AttributeElement AttributeElements},
- * {@link module:engine/view/containerelement~ContainerElement
- * ContainerElements} and {@link module:engine/view/emptyelement~EmptyElement EmptyElements}:
+ * {@link module:engine/view/containerelement~ContainerElement ContainerElements}
+ * and {@link module:engine/view/emptyelement~EmptyElement EmptyElements}:
  *
  *		const attribute = new AttributeElement( 'b' );
  *		const container = new ContainerElement( 'p' );
@@ -190,7 +184,6 @@ setData._parse = parse;
  *		attribute.priority = 20;
  *		getData( attribute, null, { showPriority: true } ); // <b view-priority="20"></b>
  *
- * @method module:engine/dev-utils/view~View.stringify
  * @param {module:engine/view/text~Text|module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment}
  * node Node to stringify.
  * @param {module:engine/view/selection~Selection|module:engine/view/position~Position|module:engine/view/range~Range}
@@ -281,7 +274,6 @@ export function stringify( node, selectionOrPositionOrRange = null, options = {}
  *		// Returns Element and selection that is placed inside of DocumentFragment containing that element.
  *		const { root, selection } = parse( '[<a></a>]' );
  *
- * @method module:engine/dev-utils/view~View.parse
  * @param {String} data HTML-like string to be parsed.
  * @param {Object} options
  * @param {Array.<Number>} [options.order] Array with order of parsed ranges added to returned

+ 2 - 2
packages/ckeditor5-engine/src/model/delta/delta.js

@@ -108,7 +108,7 @@ export default class Delta {
 	 * by the original delta.
 	 *
 	 * Keep in mind that tree model state may change since executing the original delta, so reverse delta may be "outdated".
-	 * In that case you will need to {@link module:engine/model/delta/delta~Delta.transform} it by all deltas that were executed after
+	 * In that case you will need to {@link module:engine/model/delta/transform~transform} it by all deltas that were executed after
 	 * the original delta.
 	 *
 	 * @returns {module:engine/model/delta/delta~Delta} Reversed delta.
@@ -157,7 +157,7 @@ export default class Delta {
 	}
 
 	/**
-	 * Delta priority. Used in {@link module:engine/model/delta/delta~Delta.transform delta transformations}. Delta with the higher
+	 * Delta priority. Used in {@link module:engine/model/delta/transform~transform delta transformations}. Delta with the higher
 	 * priority will be treated as more important when resolving transformation conflicts. If deltas have same
 	 * priority, other factors will be used to determine which delta is more important.
 	 *

+ 1 - 1
packages/ckeditor5-engine/src/model/delta/insertdelta.js

@@ -33,7 +33,7 @@ export default class InsertDelta extends Delta {
 	 * Node list containing all the nodes inserted by the delta or `null` if there are no operations in the delta.
 	 *
 	 * @readonly
-	 * @type {module:engine/model/node~NodeList|null}
+	 * @type {module:engine/model/nodelist~NodeList|null}
 	 */
 	get nodes() {
 		return this._insertOperation ? this._insertOperation.nodes : null;

+ 1 - 1
packages/ckeditor5-engine/src/model/delta/mergedelta.js

@@ -48,7 +48,7 @@ export default class MergeDelta extends Delta {
 
 	/**
 	 * Operation in this delta that removes the node after merge position (which will be empty at that point) or
-	 * `null` if the delta has no operations. Note, that after {@link module:engine/model/delta/delta~Delta.transform transformation}
+	 * `null` if the delta has no operations. Note, that after {@link module:engine/model/delta/transform~transform transformation}
 	 * this might be an instance of {@link module:engine/model/operation/moveoperation~MoveOperation} instead of
 	 * {@link module:engine/model/operation/removeoperation~RemoveOperation}.
 	 *

+ 1 - 1
packages/ckeditor5-engine/src/model/delta/splitdelta.js

@@ -51,7 +51,7 @@ export default class SplitDelta extends Delta {
 	 *
 	 * Most commonly this will be {@link module:engine/model/operation/insertoperation~insertOperation an insert operation},
 	 * as `SplitDelta` has to create a new node. If `SplitDelta` was created through
-	 * {@link module:module:engine/model/delta/delta~Delta/delta~Delta#getReversed reversing}
+	 * {@link module:engine/model/delta/delta~Delta#getReversed reversing}
 	 * a {@link module:engine/model/delta/delta~Delta.MergeDelta merge delta},
 	 * this will be a {@link module:engine/model/opertation/reinsertoperation~ReinsertOperation reinsert operation},
 	 * as we will want to re-insert the exact element that was removed by that merge delta.

+ 3 - 11
packages/ckeditor5-engine/src/model/delta/transform.js

@@ -29,10 +29,6 @@ const specialCases = new Map();
  * transformed using that function. If not, {@link module:engine/model/delta/delta~Delta.defaultTransform default transformation algorithm}
  * is used.
  *
- * @see module:engine/model/operation/transform~transform
- *
- * @external module:engine/model/delta/delta~Delta.transform
- * @function module:engine/model/delta/delta~Delta.transform.transform
  * @param {module:engine/model/delta/delta~Delta} a Delta that will be transformed.
  * @param {module:engine/model/delta/delta~Delta} b Delta to transform by.
  * @param {Boolean} isAMoreImportantThanB Flag indicating whether the delta which will be transformed (`a`) should be treated
@@ -67,8 +63,6 @@ function updateBaseVersion( baseVersion, deltas ) {
  * This algorithm is similar to a popular `dOPT` algorithm used in operational transformation, as we are in fact
  * transforming two sets of operations by each other.
  *
- * @external module:engine/model/delta/delta~Delta.transform
- * @function module:engine/model/delta/delta~Delta.transform.defaultTransform
  * @param {module:engine/model/delta/delta~Delta} a Delta that will be transformed.
  * @param {module:engine/model/delta/delta~Delta} b Delta to transform by.
  * @param {Boolean} isAMoreImportantThanB Flag indicating whether the delta which will be transformed (`a`) should be treated
@@ -165,8 +159,8 @@ export function defaultTransform( a, b, isAMoreImportantThanB ) {
 /**
  * Adds a special case callback for given delta classes.
  *
- * @external module:engine/model/delta/delta~Delta.transform
- * @function module:engine/model/delta/delta~Delta.transform.addTransformationCase
+ * @external module:engine/model/delta/transform~transform
+ * @function module:engine/model/delta/transform~transform.addTransformationCase
  * @param {Function} A Delta constructor which instance will get transformed.
  * @param {Function} B Delta constructor which instance will be transformed by.
  * @param {Function} resolver A callback that will handle custom special case transformation for instances of given delta classes.
@@ -183,10 +177,8 @@ export function addTransformationCase( A, B, resolver ) {
 }
 
 /**
- * Gets a special case callback which was previously {@link module:engine/model/delta/delta~Delta.transform.addTransformationCase added}.
+ * Gets a special case callback which was previously {@link module:engine/model/delta/transform~transform.addTransformationCase added}.
  *
- * @external module:engine/model/delta/delta~Delta.transform
- * @function module:engine/model/delta/delta~Delta.transform.getTransformationCase
  * @param {module:engine/model/delta/delta~Delta} a Delta to transform.
  * @param {module:engine/model/delta/delta~Delta} b Delta to be transformed by.
  */

+ 1 - 1
packages/ckeditor5-engine/src/model/delta/weakinsertdelta.js

@@ -40,7 +40,7 @@ export default class WeakInsertDelta extends InsertDelta {
  * Thanks to this, attribute change "omits" the inserted nodes. The correct behavior for `WeakInsertDelta` is that
  * {@link module:engine/model/operation/attributeoperation~AttributeOperation AttributeOperation} does not "break" and also
  * applies attributes for inserted nodes. This behavior has to be reflected during
- * {@link module:engine/model/delta/delta~Delta.transform delta transformation}.
+ * {@link module:engine/model/delta/transform~transform delta transformation}.
  *
  * @chainable
  * @method module:engine/model/batch~Batch#weakInsert

+ 14 - 14
packages/ckeditor5-engine/src/model/document.js

@@ -29,7 +29,7 @@ const graveyardName = '$graveyard';
 
 /**
  * Document tree model describes all editable data in the editor. It may contain multiple
- * {@link module:engine/model/document~Document#roots root elements}, for example if the editor have multiple editable areas,
+ * {@link module:engine/model/document~Document#_roots root elements}, for example if the editor have multiple editable areas,
  * each area will be represented by the separate root.
  *
  * All changes in the document are done by {@link module:engine/model/operation/operation~Operation operations}. To create operations in
@@ -41,8 +41,8 @@ const graveyardName = '$graveyard';
  */
 export default class Document {
 	/**
-	 * Creates an empty document instance with no {@link module:engine/model/document~Document#roots} (other than
-	 * a {@link module:engine/model/document~Document#graveyard graveyard root}).
+	 * Creates an empty document instance with no {@link #_roots} (other than
+	 * a {@link #graveyard graveyard root}).
 	 */
 	constructor() {
 		/**
@@ -52,7 +52,7 @@ export default class Document {
 		 * not match document version the {@link document-applyOperation-wrong-version} error is thrown.
 		 *
 		 * @readonly
-		 * @member {Number} module:engine/model/document~Document#version
+		 * @member {Number}
 		 */
 		this.version = 0;
 
@@ -82,7 +82,7 @@ export default class Document {
 		this.history = new History( this );
 
 		/**
-		 * Array of pending changes. See: {@link module:engine/model/document~Document#enqueueChanges}.
+		 * Array of pending changes. See: {@link #enqueueChanges}.
 		 *
 		 * @private
 		 * @member {Array.<Function>}
@@ -90,8 +90,8 @@ export default class Document {
 		this._pendingChanges = [];
 
 		/**
-		 * List of roots that are owned and managed by this document. Use {@link module:engine/model/document~Document#createRoot} and
-		 * {@link module:engine/model/document~Document#getRoot} to manipulate it.
+		 * List of roots that are owned and managed by this document. Use {@link #createRoot} and
+		 * {@link #getRoot} to manipulate it.
 		 *
 		 * @readonly
 		 * @protected
@@ -132,9 +132,9 @@ export default class Document {
 	/**
 	 * This is the entry point for all document changes. All changes on the document are done using
 	 * {@link module:engine/model/operation/operation~Operation operations}. To create operations in the simple way use the
-	 * {@link module:engine/model/batch~Batch} API available via {@link module:engine/model/document~Document#batch} method.
+	 * {@link module:engine/model/batch~Batch} API available via {@link #batch} method.
 	 *
-	 * @fires @link module:engine/model/document~Document#change
+	 * @fires event:change
 	 * @param {module:engine/model/operation/operation~Operation} operation Operation to be applied.
 	 */
 	applyOperation( operation ) {
@@ -213,14 +213,14 @@ export default class Document {
 	}
 
 	/**
-	 * Enqueues document changes. Any changes to be done on document (mostly using {@link module:engine/model/document~Document#batch}
+	 * Enqueues document changes. Any changes to be done on document (mostly using {@link #batch}
 	 * should be placed in the queued callback. If no other plugin is changing document at the moment, the callback will be
 	 * called immediately. Otherwise it will wait for all previously queued changes to finish happening. This way
 	 * queued callback will not interrupt other callbacks.
 	 *
-	 * When all queued changes are done {@link module:engine/model/document~Document#changesDone} event is fired.
+	 * When all queued changes are done {@link #event:changesDone} event is fired.
 	 *
-	 * @fires @link module:engine/model/document~Document#changesDone
+	 * @fires changesDone
 	 * @param {Function} callback Callback to enqueue.
 	 */
 	enqueueChanges( callback ) {
@@ -270,7 +270,7 @@ export default class Document {
 	}
 
 	/**
-	 * Returns array with names of all roots (without the {@link module:engine/model/document~Document#graveyard}) added to the document.
+	 * Returns array with names of all roots (without the {@link #graveyard}) added to the document.
 	 *
 	 * @returns {Array.<String>} Roots names.
 	 */
@@ -376,7 +376,7 @@ export default class Document {
 
 	/**
 	 * Checks whether given {@link module:engine/model/range~Range range} is a valid range for
-	 * {@link module:engine/model/document~Document#selection document's selection}.
+	 * {@link #selection document's selection}.
 	 *
 	 * @private
 	 * @param {module:engine/model/range~Range} range Range to check.

+ 1 - 1
packages/ckeditor5-engine/src/model/documentfragment.js

@@ -28,7 +28,7 @@ export default class DocumentFragment {
 		 * List of nodes contained inside the document fragment.
 		 *
 		 * @private
-		 * @member {module:engine/model/node~NodeList} module:engine/model/documentfragment~DocumentFragment#_children
+		 * @member {module:engine/model/nodelist~NodeList} module:engine/model/documentfragment~DocumentFragment#_children
 		 */
 		this._children = new NodeList();
 

+ 3 - 3
packages/ckeditor5-engine/src/model/element.js

@@ -23,7 +23,7 @@ export default class Element extends Node {
 	 * Creates a model element.
 	 *
 	 * @param {String} name Element's name.
-	 * @param {Object} [attrs] Element's attributes. See {@link utils.toMap} for a list of accepted values.
+	 * @param {Object} [attrs] Element's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.
 	 * @param {module:engine/model/node~Node|Iterable.<module:engine/model/node~Node>} [children]
 	 * One or more nodes to be inserted as children of created element.
 	 */
@@ -41,7 +41,7 @@ export default class Element extends Node {
 		 * List of children nodes.
 		 *
 		 * @private
-		 * @member {module:engine/model/node~NodeList} module:engine/model/element~Element#_children
+		 * @member {module:engine/model/nodelist~NodeList} module:engine/model/element~Element#_children
 		 */
 		this._children = new NodeList();
 
@@ -138,7 +138,7 @@ export default class Element extends Node {
 
 	/**
 	 * Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is
-	 * too high, returns {@link module:engine/model/element~Element#getChildCount index after last child}.
+	 * too high, returns {@link module:engine/model/element~Element#getChildIndex index after last child}.
 	 *
 	 *		const textNode = new Text( 'foo' );
 	 *		const pElement = new Element( 'p' );

+ 1 - 1
packages/ckeditor5-engine/src/model/model.jdoc → packages/ckeditor5-engine/src/model/model.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @module engine/model
+ * @module engine/model/model
  */

+ 2 - 2
packages/ckeditor5-engine/src/model/node.js

@@ -45,7 +45,7 @@ export default class Node {
 	 * This is an abstract class, so this constructor should not be used directly.
 	 *
 	 * @abstract
-	 * @param {Object} [attrs] Node's attributes. See {@link utils.toMap} for a list of accepted values.
+	 * @param {Object} [attrs] Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.
 	 */
 	constructor( attrs ) {
 		/**
@@ -330,7 +330,7 @@ export default class Node {
 	/**
 	 * Removes all attributes from the node and sets given attributes.
 	 *
-	 * @param {Object} [attrs] Attributes to set. See {@link utils.toMap} for a list of accepted values.
+	 * @param {Object} [attrs] Attributes to set. See {@link module:utils/tomap~toMap} for a list of accepted values.
 	 */
 	setAttributesTo( attrs ) {
 		this._attrs = toMap( attrs );

+ 1 - 1
packages/ckeditor5-engine/src/model/nodelist.js

@@ -103,7 +103,7 @@ export default class NodeList {
 	 * Converts index to offset in node list.
 	 *
 	 * Returns starting offset of a node that is at given index. Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError}
-	 * `model-nodelist-index-out-of-bounds` if given index is less than `0` or more than {@link module:engine/model/node~NodeList#length}.
+	 * `model-nodelist-index-out-of-bounds` if given index is less than `0` or more than {@link #length}.
 	 *
 	 * @param {Number} index Node's index.
 	 * @returns {Number} Node's starting offset.

+ 1 - 1
packages/ckeditor5-engine/src/model/operation/insertoperation.js

@@ -44,7 +44,7 @@ export default class InsertOperation extends Operation {
 		 * List of nodes to insert.
 		 *
 		 * @readonly
-		 * @member {module:engine/model/node~NodeList} module:engine/model/operation/insertoperation~insertOperation#nodeList
+		 * @member {module:engine/model/nodelist~NodeList} module:engine/model/operation/insertoperation~insertOperation#nodeList
 		 */
 		this.nodes = new NodeList( normalizeNodes( nodes ) );
 	}

+ 1 - 1
packages/ckeditor5-engine/src/model/operation/transform.js

@@ -51,7 +51,7 @@ import compareArrays from '../../../utils/comparearrays.js';
  * `a` by `b` and also `b` by `a`. In both transformations the same operation has to be the important one. If we assume
  * that first or the second passed operation is always more important we won't be able to solve this case.
  *
- * @external engine.model.operation
+ * @external module:engine/model/model.operation
  * @function module:engine/model/operation/transform~transform
  * @param {module:engine/model/operation/operation~Operation} a Operation that will be transformed.
  * @param {module:engine/model/operation/operation~Operation} b Operation to transform by.

+ 2 - 2
packages/ckeditor5-engine/src/model/position.js

@@ -269,7 +269,7 @@ export default class Position {
 	 * Returns the slice of two position {@link #path paths} which is identical. The {@link #root roots}
 	 * of these two paths must be identical.
 	 *
-	 * @param {engine.model.Position} position The second position.
+	 * @param {module:engine/model/position~Position} position The second position.
 	 * @returns {Array.<Number>} The common path.
 	 */
 	getCommonPath( position ) {
@@ -286,7 +286,7 @@ export default class Position {
 	}
 
 	/**
-	 * Returns a new instance of `Position`, that has same {@link engine.model.Position#parent parent} but it's offset
+	 * Returns a new instance of `Position`, that has same {@link #parent parent} but it's offset
 	 * is shifted by `shift` value (can be a negative value).
 	 *
 	 * @param {Number} shift Offset shift. Can be a negative value.

+ 1 - 0
packages/ckeditor5-engine/src/model/range.js

@@ -328,6 +328,7 @@ export default class Range {
 	 * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~TreeWalker} for
 	 * a full list of available options.
 	 *
+	 * @method getItems
 	 * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.
 	 * @returns {Iterable.<module:engine/model/item~Item>}
 	 */

+ 32 - 28
packages/ckeditor5-engine/src/model/selection.js

@@ -29,7 +29,7 @@ export default class Selection {
 		 * Specifies whether the last added range was added as a backward or forward range.
 		 *
 		 * @private
-		 * @member {Boolean} module:engine/model/selection~Selection#_lastRangeBackward
+		 * @member {Boolean}
 		 */
 		this._lastRangeBackward = false;
 
@@ -37,7 +37,7 @@ export default class Selection {
 		 * Stores selection ranges.
 		 *
 		 * @protected
-		 * @member {Array.<module:engine/model/range~Range>} module:engine/model/selection~Selection#_ranges
+		 * @member {Array.<module:engine/model/range~Range>}
 		 */
 		this._ranges = [];
 
@@ -52,13 +52,13 @@ export default class Selection {
 
 	/**
 	 * Selection anchor. Anchor may be described as a position where the most recent part of the selection starts.
-	 * Together with {@link module:engine/model/selection~Selection#focus} they define the direction of selection, which is important
+	 * Together with {@link #focus} they define the direction of selection, which is important
 	 * when expanding/shrinking selection. Anchor is always {@link module:engine/model/range~Range#start start} or
 	 * {@link module:engine/model/range~Range#end end} position of the most recently added range.
 	 *
 	 * Is set to `null` if there are no ranges in selection.
 	 *
-	 * @see module:engine/model/selection~Selection#focus
+	 * @see #focus
 	 * @readonly
 	 * @type {module:engine/model/position~Position|null}
 	 */
@@ -77,7 +77,7 @@ export default class Selection {
 	 *
 	 * Is set to `null` if there are no ranges in selection.
 	 *
-	 * @see module:engine/model/selection~Selection#anchor
+	 * @see #anchor
 	 * @readonly
 	 * @type {module:engine/model/position~Position|null}
 	 */
@@ -118,8 +118,8 @@ export default class Selection {
 	}
 
 	/**
-	 * Specifies whether the {@link module:engine/model/selection~Selection#focus}
-	 * precedes {@link module:engine/model/selection~Selection#anchor}.
+	 * Specifies whether the {@link #focus}
+	 * precedes {@link #anchor}.
 	 *
 	 * @type {Boolean}
 	 */
@@ -256,10 +256,10 @@ export default class Selection {
 	 * {@link module:engine/model/range~Range#start start} to {@link module:engine/model/range~Range#end end}
 	 * or from {@link module:engine/model/range~Range#end end}
 	 * to {@link module:engine/model/range~Range#start start}.
-	 * The flag is used to set {@link module:engine/model/selection~Selection#anchor} and
-	 * {@link module:engine/model/selection~Selection#focus} properties.
+	 * The flag is used to set {@link #anchor} and
+	 * {@link #focus} properties.
 	 *
-	 * @fires module:engine/model/selection~Selection#change:range
+	 * @fires change:range
 	 * @param {module:engine/model/range~Range} range Range to add.
 	 * @param {Boolean} [isBackward=false] Flag describing if added range was selected forward - from start to end (`false`)
 	 * or backward - from end to start (`true`).
@@ -274,7 +274,7 @@ export default class Selection {
 	/**
 	 * Removes all ranges that were added to the selection.
 	 *
-	 * @fires module:engine/model/selection~Selection#change:range
+	 * @fires change:range
 	 */
 	removeAllRanges() {
 		if ( this._ranges.length > 0 ) {
@@ -289,7 +289,7 @@ export default class Selection {
 	 * {@link module:engine/model/selection~Selection#focus}. Accepts a flag describing in which direction the selection is made
 	 * (see {@link module:engine/model/selection~Selection#addRange}).
 	 *
-	 * @fires module:engine/model/selection~Selection#change:range
+	 * @fires change:range
 	 * @param {Iterable.<module:engine/model/range~Range>} newRanges Ranges to set.
 	 * @param {Boolean} [isLastBackward=false] Flag describing if last added range was selected forward - from start to end (`false`)
 	 * or backward - from end to start (`true`).
@@ -338,7 +338,7 @@ export default class Selection {
 	 *
 	 * The location can be specified in the same form as {@link module:engine/model/position~Position.createAt} parameters.
 	 *
-	 * @fires module:engine/model/selection~Selection#change:range
+	 * @fires change:range
 	 * @param {module:engine/model/item~Item|module:engine/model/position~Position} itemOrPosition
 	 * @param {Number|'end'|'before'|'after'} [offset=0] Offset or one of the flags. Used only when
 	 * first parameter is a {@link module:engine/model/item~Item model item}.
@@ -355,7 +355,7 @@ export default class Selection {
 	 * All ranges, besides the collapsed one, will be removed. Nothing will change if there are no ranges stored
 	 * inside selection.
 	 *
-	 * @fires module:engine/view/selection~Selection#change
+	 * @fires change
 	 */
 	collapseToStart() {
 		const startPosition = this.getFirstPosition();
@@ -370,7 +370,7 @@ export default class Selection {
 	 * All ranges, besides the collapsed one, will be removed. Nothing will change if there are no ranges stored
 	 * inside selection.
 	 *
-	 * @fires module:engine/view/selection~Selection#change
+	 * @fires change
 	 */
 	collapseToEnd() {
 		const endPosition = this.getLastPosition();
@@ -385,7 +385,7 @@ export default class Selection {
 	 *
 	 * The location can be specified in the same form as {@link module:engine/model/position~Position.createAt} parameters.
 	 *
-	 * @fires module:engine/model/selection~Selection#change:range
+	 * @fires change:range
 	 * @param {module:engine/model/item~Item|module:engine/model/position~Position} itemOrPosition
 	 * @param {Number|'end'|'before'|'after'} [offset=0] Offset or one of the flags. Used only when
 	 * first parameter is a {@link module:engine/model/item~Item model item}.
@@ -463,10 +463,10 @@ export default class Selection {
 	/**
 	 * Removes all attributes from the selection.
 	 *
-	 * If there were any attributes in selection, fires the {@link module:engine/model/selection~Selection#change} event with
+	 * If there were any attributes in selection, fires the {@link #event:change} event with
 	 * removed attributes' keys.
 	 *
-	 * @fires module:engine/model/selection~Selection#change:attribute
+	 * @fires change:attribute
 	 */
 	clearAttributes() {
 		if ( this._attrs.size > 0 ) {
@@ -480,10 +480,10 @@ export default class Selection {
 	/**
 	 * Removes an attribute with given key from the selection.
 	 *
-	 * If given attribute was set on the selection, fires the {@link module:engine/model/selection~Selection#change} event with
+	 * If given attribute was set on the selection, fires the {@link #event:change} event with
 	 * removed attribute key.
 	 *
-	 * @fires module:engine/model/selection~Selection#change:attribute
+	 * @fires change:attribute
 	 * @param {String} key Key of attribute to remove.
 	 */
 	removeAttribute( key ) {
@@ -497,10 +497,10 @@ export default class Selection {
 	/**
 	 * Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten.
 	 *
-	 * If the attribute value has changed, fires the {@link module:engine/model/selection~Selection#change} event with
+	 * If the attribute value has changed, fires the {@link #event:change} event with
 	 * the attribute key.
 	 *
-	 * @fires module:engine/model/selection~Selection#change:attribute
+	 * @fires change:attribute
 	 * @param {String} key Key of attribute to set.
 	 * @param {*} value Attribute value.
 	 */
@@ -516,9 +516,9 @@ export default class Selection {
 	 * Removes all attributes from the selection and sets given attributes.
 	 *
 	 * If given set of attributes is different than set of attributes already added to selection, fires
-	 * {@link module:engine/model/selection~Selection#change change event} with keys of attributes that changed.
+	 * {@link #event:change change event} with keys of attributes that changed.
 	 *
-	 * @fires module:engine/model/selection~Selection#change:attribute
+	 * @fires event:change:attribute
 	 * @param {Iterable|Object} attrs Iterable object containing attributes to be set.
 	 */
 	setAttributesTo( attrs ) {
@@ -556,7 +556,7 @@ export default class Selection {
 	}
 
 	/**
-	 * Adds given range to internal {@link module:engine/model/selection~Selection#_ranges ranges array}. Throws an error
+	 * Adds given range to internal {@link #_ranges ranges array}. Throws an error
 	 * if given range is intersecting with any range that is already stored in this selection.
 	 *
 	 * @protected
@@ -605,7 +605,7 @@ export default class Selection {
 	}
 
 	/**
-	 * Deletes ranges from internal range array. Uses {@link module:engine/model/selection~Selection#_popRange _popRange} to
+	 * Deletes ranges from internal range array. Uses {@link #_popRange _popRange} to
 	 * ensure proper ranges removal.
 	 *
 	 * @private
@@ -616,10 +616,14 @@ export default class Selection {
 		}
 	}
 
+	/**
+	 * @event change
+	 */
+
 	/**
 	 * Fired whenever selection ranges are changed.
 	 *
-	 * @event range
+	 * @event change:range
 	 * @param {Boolean} directChange Specifies whether the range change was caused by direct usage of `Selection` API (`true`)
 	 * or by changes done to {@link module:engine/model/document~Document model document}
 	 * using {@link module:engine/model/batch~Batch Batch} API (`false`).
@@ -628,7 +632,7 @@ export default class Selection {
 	/**
 	 * Fired whenever selection attributes are changed.
 	 *
-	 * @event attribute
+	 * @event change:attribute
 	 * @param {Boolean} directChange Specifies whether the attributes changed by direct usage of the Selection API (`true`)
 	 * or by changes done to the {@link module:engine/model/document~Document model document}
 	 * using the {@link module:engine/model/batch~Batch Batch} API (`false`).

+ 1 - 1
packages/ckeditor5-engine/src/model/text.js

@@ -25,7 +25,7 @@ export default class Text extends Node {
 	 * Creates a text node.
 	 *
 	 * @param {String} data Node's text.
-	 * @param {Object} [attrs] Node's attributes. See {@link utils.toMap} for a list of accepted values.
+	 * @param {Object} [attrs] Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.
 	 */
 	constructor( data, attrs ) {
 		super( attrs );

+ 2 - 2
packages/ckeditor5-engine/src/model/treewalker.js

@@ -26,7 +26,7 @@ export default class TreeWalker {
 	 * @param {module:engine/model/range~Range} [options.boundaries=null] Range to define boundaries of the iterator.
 	 * @param {module:engine/model/position~Position} [options.startPosition] Starting position.
 	 * @param {Boolean} [options.singleCharacters=false] Flag indicating whether all consecutive characters with the same attributes
-	 * should be returned one by one as multiple {@link module:engine/model/characterproxy~CharacterProxy} (`true`) objects or as one
+	 * should be returned one by one as multiple {@link module:engine/model/textproxy~TextProxy} (`true`) objects or as one
 	 * {@link module:engine/model/textproxy~TextProxy} (`false`).
 	 * @param {Boolean} [options.shallow=false] Flag indicating whether iterator should enter elements or not. If the
 	 * iterator is shallow child nodes of any iterated node will not be returned along with `elementEnd` tag.
@@ -92,7 +92,7 @@ export default class TreeWalker {
 
 		/**
 		 * Flag indicating whether all consecutive characters with the same attributes should be
-		 * returned as one {@link module:engine/model/characterproxy~CharacterProxy} (`true`) or one by one (`false`).
+		 * returned as one {@link module:engine/model/textproxy~TextProxy} (`true`) or one by one (`false`).
 		 *
 		 * @readonly
 		 * @member {Boolean} module:engine/model/treewalker~TreeWalker#singleCharacters

+ 2 - 2
packages/ckeditor5-engine/src/model/writer.js

@@ -306,7 +306,7 @@ function _haveSameAttributes( nodeA, nodeB ) {
  * Non-arrays are normalized as follows:
  * * {@link module:engine/model/node~Node Node} is left as is,
  * * {@link module:engine/model/textproxy~TextProxy TextProxy} and `String` are normalized to {@link module:engine/model/text~Text Text},
- * * {@link module:engine/model/node~NodeList NodeList} is normalized to an array containing all nodes that are in that node list,
+ * * {@link module:engine/model/nodelist~NodeList NodeList} is normalized to an array containing all nodes that are in that node list,
  * * {@link module:engine/model/documentfragment~DocumentFragment DocumentFragment} is normalized to an array containing all of it's
  * * children.
  *
@@ -315,6 +315,6 @@ function _haveSameAttributes( nodeA, nodeB ) {
  * merged if they have same attributes.
  *
  * @typedef {module:engine/model/node~Node|module:engine/model/textproxy~TextProxy|String|
- * module:engine/model/node~NodeList|module:engine/model/documentfragment~DocumentFragment|Iterable}
+ * module:engine/model/nodelist~NodeList|module:engine/model/documentfragment~DocumentFragment|Iterable}
  * module:engine/model/node~NodeSet
  */

+ 4 - 4
packages/ckeditor5-engine/src/view/document.js

@@ -36,7 +36,7 @@ import ObservableMixin from '../../utils/observablemixin.js';
  * * {@link module:engine/view/observer/selectionobserver~SelectionObserver},
  * * {@link module:engine/view/observer/focusobserver~FocusObserver},
  * * {@link module:engine/view/observer/keyobserver~KeyObserver},
- * * {@link module:engine/view/observer/fakeselecionobserver~FakeSelectionObserver}.
+ * * {@link module:engine/view/observer/fakeselectionobserver~FakeSelectionObserver}.
  *
  * @mixes utils.EmitterMixin
  */
@@ -135,8 +135,8 @@ export default class Document {
 	 * multiple times without caring whether it has been already added or not.
 	 *
 	 * @param {Function} Observer The constructor of an observer to add.
-	 * Should create an instance inheriting from {@link module:engine/view/observer/observer~Observer.Observer}.
-	 * @returns {module:engine/view/observer/observer~Observer.Observer} Added observer instance.
+	 * Should create an instance inheriting from {@link module:engine/view/observer/observer~Observer}.
+	 * @returns {module:engine/view/observer/observer~Observer} Added observer instance.
 	 */
 	addObserver( Observer ) {
 		let observer = this._observers.get( Observer );
@@ -162,7 +162,7 @@ export default class Document {
 	 * Returns observer of the given type or `undefined` if such observer has not been added yet.
 	 *
 	 * @param {Function} Observer The constructor of an observer to get.
-	 * @returns {module:engine/view/observer/observer~Observer.Observer|undefined} Observer instance or undefined.
+	 * @returns {module:engine/view/observer/observer~Observer|undefined} Observer instance or undefined.
 	 */
 	getObserver( Observer ) {
 		return this._observers.get( Observer );

+ 1 - 1
packages/ckeditor5-engine/src/view/element.js

@@ -155,7 +155,7 @@ export default class Element extends Node {
 	}
 
 	/**
-	 * {@link module:engine/view/element~Element#insert Insert} a child node or a list of child nodes at the end of this node and sets
+	 * {@link module:engine/view/element~Element#insertChildren Insert} a child node or a list of child nodes at the end of this node and sets
 	 * the parent of these nodes to this element.
 	 *
 	 * @fires change

+ 32 - 28
packages/ckeditor5-engine/src/view/node.js

@@ -148,7 +148,7 @@ export default class Node {
 	/**
 	 * @param {module:engine/view/document~ChangeType} type Type of the change.
 	 * @param {module:engine/view/node~Node} node Changed node.
-	 * @fires module:engine/view/node~Node#change
+	 * @fires change
 	 */
 	_fireChange( type, node ) {
 		this.fire( 'change:' + type, node );
@@ -161,43 +161,47 @@ export default class Node {
 	/**
 	 * Clones this node.
 	 *
-	 * @method module:engine/view/node~Node#clone
+	 * @method #clone
 	 * @returns {module:engine/view/node~Node} Clone of this node.
 	 */
 
 	/**
 	 * Checks if provided node is similar to this node.
 	 *
-	 * @method module:engine/view/node~Node#isSimilar
+	 * @method #isSimilar
 	 * @returns {Boolean} True if nodes are similar.
 	 */
+}
 
-	/**
-	 * Fired when list of {@link module:engine/view/element~Element elements} children changes.
-	 *
-	 * Change event is bubbled – it is fired on all ancestors.
-	 *
-	 * @event module:engine/view/node~Node#change:children
-	 * @param {module:engine/view/node~Node} Changed node.
-	 */
+/**
+ * Fired when list of {@link module:engine/view/element~Element elements} children changes.
+ *
+ * Change event is bubbled – it is fired on all ancestors.
+ *
+ * @event change:children
+ * @param {module:engine/view/node~Node} Changed node.
+ */
 
-	/**
-	 * Fired when list of {@link module:engine/view/element~Element elements} attributes changes.
-	 *
-	 * Change event is bubbled – it is fired on all ancestors.
-	 *
-	 * @event module:engine/view/node~Node#change:attributes
-	 * @param {module:engine/view/node~Node} Changed node.
-	 */
+/**
+ * Fired when list of {@link module:engine/view/element~Element elements} attributes changes.
+ *
+ * Change event is bubbled – it is fired on all ancestors.
+ *
+ * @event change:attributes
+ * @param {module:engine/view/node~Node} Changed node.
+ */
 
-	/**
-	 * Fired when {@link module:engine/view/text~Text text nodes} data changes.
-	 *
-	 * Change event is bubbled – it is fired on all ancestors.
-	 *
-	 * @event module:engine/view/node~Node#change:text
-	 * @param {module:engine/view/node~Node} Changed node.
-	 */
-}
+/**
+ * Fired when {@link module:engine/view/text~Text text nodes} data changes.
+ *
+ * Change event is bubbled – it is fired on all ancestors.
+ *
+ * @event text
+ * @param {module:engine/view/node~Node} Changed node.
+ */
+
+/**
+ * @event change
+ */
 
 mix( Node, EmitterMixin );

+ 2 - 2
packages/ckeditor5-engine/src/view/observer/clickobserver.js

@@ -10,7 +10,7 @@
 import DomEventObserver from './domeventobserver.js';
 
 /**
- * {@link module:engine/view/document~Document#click Click} event observer.
+ * {@link module:engine/view/document~Document#event:click Click} event observer.
  *
  * Note that this observer is not available by default. To make it available it needs to be added to {@link
  * module:engine/view/document~Document}
@@ -40,6 +40,6 @@ export default class ClickObserver extends DomEventObserver {
  * to {@link module:engine/view/document~Document} by a {@link module:engine/view/document~Document#addObserver} method.
  *
  * @see module:engine/view/observer/observer~Observer.ClickObserver
- * @event module:engine/view/document~Document#click
+ * @event module:engine/view/document~Document#event:click
  * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.
  */

+ 2 - 2
packages/ckeditor5-engine/src/view/observer/fakeselectionobserver.js

@@ -13,7 +13,7 @@ import { keyCodes } from '../../../utils/keyboard.js';
 
 /**
  * Fake selection observer class. If view selection is fake it is placed in dummy DOM container. This observer listens
- * on {@link module:engine/view/document~Document#keydown keydown} events and handles moving fake view selection to the correct place
+ * on {@link module:engine/view/document~Document#event:keydown keydown} events and handles moving fake view selection to the correct place
  * if arrow keys are pressed.
  * Fires {@link module:engine/view/document~Document#selectionChage selectionChange event} simulating natural behaviour of
  * {@link module:engine/view/observer/selectionobserver~SelectionObserver SelectionObserver}.
@@ -52,7 +52,7 @@ export default class FakeSelectionObserver extends Observer {
 	 * Handles collapsing view selection according to given key code. If left or up key is provided - new selection will be
 	 * collapsed to left. If right or down key is pressed - new selection will be collapsed to right.
 	 *
-	 * This method fires {@link module:engine/view/document~Document#selectionChange} event imitating behaviour of
+	 * This method fires {@link module:engine/view/document~Document#event:selectionChange} event imitating behaviour of
 	 * {@link module:engine/view/observer/selectionobserver~SelectionObserver}.
 	 *
 	 * @private

+ 4 - 3
packages/ckeditor5-engine/src/view/observer/focusobserver.js

@@ -10,7 +10,8 @@
 import DomEventObserver from './domeventobserver.js';
 
 /**
- * {@link module:engine/view/document~Document#focus Focus} and {@link module:engine/view/document~Document#blur blur} events observer.
+ * {@link module:engine/view/document~Document#event:focus Focus}
+ * and {@link module:engine/view/document~Document#event:blur blur} events observer.
  * Focus observer handle also {@link module:engine/view/rooteditableelement~RootEditableElement#isFocused isFocused} property of the
  * {@link module:engine/view/rooteditableelement~RootEditableElement root elements}.
  *
@@ -52,7 +53,7 @@ export default class FocusObserver extends DomEventObserver {
  * this event is available by default.
  *
  * @see module:engine/view/observer/focusobserver~FocusObserver
- * @event module:engine/view/document~Document#focus
+ * @event module:engine/view/document~Document#event:focus
  * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.
  */
 
@@ -66,6 +67,6 @@ export default class FocusObserver extends DomEventObserver {
  * this event is available by default.
  *
  * @see module:engine/view/observer/focusobserver~FocusObserver
- * @event module:engine/view/document~Document#blur
+ * @event module:engine/view/document~Document#event:blur
  * @param {module:engine/view/observer/domeventdata~DomEventData} data Event data.
  */

+ 3 - 3
packages/ckeditor5-engine/src/view/observer/keyobserver.js

@@ -11,7 +11,7 @@ import DomEventObserver from './domeventobserver.js';
 import { getCode } from '../../../utils/keyboard.js';
 
 /**
- * {@link module:engine/view/document~Document#keydown Key down} event observer.
+ * {@link module:engine/view/document~Document#event:keydown Key down} event observer.
  *
  * Note that this observer is attached by the {@link module:engine/view/document~Document} and is available by default.
  *
@@ -49,12 +49,12 @@ export default class KeyObserver extends DomEventObserver {
  * this event is available by default.
  *
  * @see module:engine/view/observer/keyobserver~KeyObserver
- * @event module:engine/view/document~Document#keydown
+ * @event module:engine/view/document~Document#event:keydown
  * @param {module:engine/view/observer/keyobserver~KeyObserver.KeyEventData} keyEventData
  */
 
 /**
- * The value of the {@link module:engine/view/document~Document#keydown} event.
+ * The value of the {@link module:engine/view/document~Document#event:keydown} event.
  *
  * @class module:engine/view/observer/keyobserver~KeyObserver.KeyEventData
  * @extends module:engine/view/observer/domeventdata~DomEventData

+ 19 - 21
packages/ckeditor5-engine/src/view/observer/mutationobserver.js

@@ -14,16 +14,15 @@ import ViewSelection from '../selection.js';
 import { startsWithFiller, getDataWithoutFiller } from '../filler.js';
 
 /**
- * Mutation observer class observes changes in the DOM, fires {@link module:engine/view/document~Document#mutations} event, mark view
- * elements
- * as changed and call {@link engine.view.render}. Because all mutated nodes are marked as "to be rendered" and the
- * {@link engine.view.render} is called, all changes will be reverted, unless the mutation will be handled by the
- * {@link module:engine/view/document~Document#mutations} event listener. It means user will see only handled changes, and the editor will
- * block all changes which are not handled.
+ * Mutation observer class observes changes in the DOM, fires {@link module:engine/view/document~Document#event:mutations} event, mark view
+ * elements as changed and call {@link module:engine/view/view~render}. Because all mutated nodes are marked as "to be rendered" and the
+ * {@link module:engine/view/view.render} is called, all changes will be reverted, unless the mutation will be handled by the
+ * {@link module:engine/view/document~Document#event:mutations} event listener. It means user will see only handled changes, and the editor
+ * will block all changes which are not handled.
  *
  * Mutation Observer also take care of reducing number of mutations which are fired. It removes duplicates and
  * mutations on elements which do not have corresponding view elements. Also
- * {@link module:engine/view/document~Document.MutatedText text mutation} is fired only if parent element do not change child list.
+ * {@link module:engine/view/observer/mutationobserver~MutatedText text mutation} is fired only if parent element do not change child list.
  *
  * Note that this observer is attached by the {@link module:engine/view/document~Document} and is available by default.
  * @extends module:engine/view/observer/observer~Observer.Observer
@@ -36,7 +35,7 @@ export default class MutationObserver extends Observer {
 		 * Native mutation observer config.
 		 *
 		 * @private
-		 * @member {Object} module:engine/view/observer/mutationobserver~MutationObserver#_config
+		 * @member {Object}
 		 */
 		this._config = {
 			childList: true,
@@ -48,14 +47,14 @@ export default class MutationObserver extends Observer {
 		/**
 		 * Reference to the {@link module:engine/view/document~Document#domConverter}.
 		 *
-		 * @member {module:engine/view/domconverter~DomConverter} module:engine/view/observer/mutationobserver~MutationObserver#domConverter
+		 * @member {module:engine/view/domconverter~DomConverter}
 		 */
 		this.domConverter = document.domConverter;
 
 		/**
 		 * Reference to the {@link module:engine/view/document~Document#renderer}.
 		 *
-		 * @member {module:engine/view/renderer~Renderer} module:engine/view/observer/mutationobserver~MutationObserver#renderer
+		 * @member {module:engine/view/renderer~Renderer}
 		 */
 		this.renderer = document.renderer;
 
@@ -63,7 +62,7 @@ export default class MutationObserver extends Observer {
 		 * Observed DOM elements.
 		 *
 		 * @private
-		 * @member {Array.<HTMLElement>} module:engine/view/observer/mutationobserver~MutationObserver#_domElements
+		 * @member {Array.<HTMLElement>}
 		 */
 		this._domElements = [];
 
@@ -71,13 +70,13 @@ export default class MutationObserver extends Observer {
 		 * Native mutation observer.
 		 *
 		 * @private
-		 * @member {MutationObserver} module:engine/view/observer/mutationobserver~MutationObserver#_mutationObserver
+		 * @member {MutationObserver}
 		 */
 		this._mutationObserver = new window.MutationObserver( this._onMutations.bind( this ) );
 	}
 
 	/**
-	 * Synchronously fires {@link module:engine/view/document~Document#mutations} event with all mutations in record queue.
+	 * Synchronously fires {@link module:engine/view/document~Document#event:mutations} event with all mutations in record queue.
 	 * At the same time empties the queue so mutations will not be fired twice.
 	 */
 	flush() {
@@ -128,7 +127,6 @@ export default class MutationObserver extends Observer {
 	 * Handles mutations. Deduplicates, mark view elements to sync, fire event and call render.
 	 *
 	 * @private
-	 * @method module:engine/view/observer/mutationobserver~MutationObserver#_onMutations
 	 * @param {Array.<Object>} domMutations Array of native mutations.
 	 */
 	_onMutations( domMutations ) {
@@ -246,11 +244,11 @@ export default class MutationObserver extends Observer {
  * this event is available by default.
  *
  * @see module:engine/view/observer/mutationobserver~MutationObserver
- * @event module:engine/view/document~Document#mutations
- * @param {Array.<module:engine/view/document~Document~MutatedText|module:engine/view/document~Document~MutatatedChildren>} viewMutations
- * Array of mutations.
- * For mutated texts it will be {@link module:engine/view/document~Document~MutatedText} and for mutated elements it will be
- * {@link module:engine/view/document~Document~MutatatedElement}. You can recognize the type based on the `type` property.
+ * @event module:engine/view/document~Document#event:mutations
+ * @param {Array.<module:engine/view/observer/mutationobserver~MutatedText|module:engine/view/observer/mutationobserver~MutatatedChildren>}
+ * viewMutations Array of mutations.
+ * For mutated texts it will be {@linkmodule:engine/view/observer/mutationobserver~MutatedText} and for mutated elements it will be
+ * {@link module:engine/view/observer/mutationobserver~MutatatedChildren}. You can recognize the type based on the `type` property.
  * @param {module:engine/view/selection~Selection|null} viewSelection View selection that is a result of converting DOM selection to view.
  * Keep in
  * mind that the DOM selection is already "updated", meaning that it already acknowledges changes done in mutation.
@@ -259,7 +257,7 @@ export default class MutationObserver extends Observer {
 /**
  * Mutation item for text.
  *
- * @see module:engine/view/document~Document#mutations
+ * @see module:engine/view/document~Document#event:mutations
  * @see module:engine/view/observer/mutationobserver~MutatatedChildren
  *
  * @typedef {Object} module:engine/view/observer/mutationobserver~MutatedText
@@ -273,7 +271,7 @@ export default class MutationObserver extends Observer {
 /**
  * Mutation item for child nodes.
  *
- * @see module:engine/view/document~Document#mutations
+ * @see module:engine/view/document~Document#event:mutations
  * @see module:engine/view/observer/mutationobserver~MutatedText
  *
  * @typedef {Object} module:engine/view/observer/mutationobserver~MutatatedChildren

+ 4 - 4
packages/ckeditor5-engine/src/view/observer/selectionobserver.js

@@ -17,7 +17,7 @@ import log from '../../../utils/log.js';
  * Selection observer class observes selection changes in the document. If selection changes on the document this
  * observer checks if there are any mutations and if DOM selection is different than the
  * {@link module:engine/view/document~Document#selection view selection}. Selection observer fires
- * {@link module:engine/view/document~Document#selectionChange} event only if selection change was the only change in the document
+ * {@link module:engine/view/document~Document#event:selectionChange} event only if selection change was the only change in the document
  * and DOM selection is different then the view selection.
  *
  * Note that this observer is attached by the {@link module:engine/view/document~Document} and is available by default.
@@ -32,7 +32,7 @@ export default class SelectionObserver extends Observer {
 		/**
 		 * Instance of the mutation observer. Selection observer calls
 		 * {@link module:engine/view/observer/mutationobserver~MutationObserver#flush} to ensure that the mutations will be handled before the
-		 * {@link module:engine/view/document~Document#selectionChange} event is fired.
+		 * {@link module:engine/view/document~Document#event:selectionChange} event is fired.
 		 *
 		 * @readonly
 		 * @member {module:engine/view/observer/mutationobserver~MutationObserver}
@@ -126,7 +126,7 @@ export default class SelectionObserver extends Observer {
 
 	/**
 	 * Selection change listener. {@link module:engine/view/observer/mutationobserver~MutationObserver#flush Flush} mutations, check if
-	 * selection changes and fires {@link module:engine/view/document~Document#selectionChange} event.
+	 * selection changes and fires {@link module:engine/view/document~Document#event:selectionChange} event.
 	 *
 	 * @private
 	 * @param {Document} domDocument DOM document.
@@ -225,7 +225,7 @@ export default class SelectionObserver extends Observer {
  * this event is available by default.
  *
  * @see module:engine/view/observer/selectionobserver~SelectionObserver
- * @event module:engine/view/document~Document#selectionChange
+ * @event module:engine/view/document~Document#event:selectionChange
  * @param {Object} data
  * @param {module:engine/view/selection~Selection} data.oldSelection Old View selection which is
  * {@link module:engine/view/document~Document#selection}.

+ 5 - 7
packages/ckeditor5-engine/src/view/range.js

@@ -26,16 +26,14 @@ export default class Range {
 		/**
 		 * Start position.
 		 *
-		 * @member module:engine/view/range~Range#start
-		 * @type {module:engine/view/position~Position}
+		 * @member {module:engine/view/position~Position}
 		 */
 		this.start = Position.createFromPosition( start );
 
 		/**
 		 * End position.
 		 *
-		 * @member module:engine/view/range~Range#end
-		 * @type {module:engine/view/position~Position}
+		 * @member {module:engine/view/position~Position}
 		 */
 		this.end = end ? Position.createFromPosition( end ) : Position.createFromPosition( start );
 	}
@@ -230,12 +228,12 @@ export default class Range {
 	}
 
 	/**
-	 * Returns an iterator that iterates over all {@link module:engine/view/item~Items view items} that are in this range and returns
+	 * Returns an iterator that iterates over all {@link module:engine/view/item~Item view items} that are in this range and returns
 	 * them.
 	 *
 	 * This method uses {@link module:engine/view/treewalker~TreeWalker} with `boundaries` set to this range and `ignoreElementEnd` option
-	 * set to `true`. However it returns only {@link module:engine/view/item~Item items}, not {@link
-	 * module:engine/view/treewalker~TreeWalkerValue}.
+	 * set to `true`. However it returns only {@link module:engine/view/item~Item items},
+	 * not {@link module:engine/view/treewalker~TreeWalkerValue}.
 	 *
 	 * You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~TreeWalker} for
 	 * a full list of available options.

+ 15 - 14
packages/ckeditor5-engine/src/view/renderer.js

@@ -45,7 +45,7 @@ export default class Renderer {
 		/**
 		 * Set of DOM Documents instances.
 		 *
-		 * @member {Set.<Document>} module:engine/view/renderer~Renderer#domDocuments
+		 * @member {Set.<Document>}
 		 */
 		this.domDocuments = new Set();
 
@@ -53,7 +53,7 @@ export default class Renderer {
 		 * Converter instance.
 		 *
 		 * @readonly
-		 * @member {module:engine/view/domconverter~DomConverter} module:engine/view/renderer~Renderer#domConverter
+		 * @member {module:engine/view/domconverter~DomConverter}
 		 */
 		this.domConverter = domConverter;
 
@@ -61,7 +61,7 @@ export default class Renderer {
 		 * Set of nodes which attributes changed and may need to be rendered.
 		 *
 		 * @readonly
-		 * @member {Set.<module:engine/view/node~Node>} module:engine/view/renderer~Renderer#markedAttributes
+		 * @member {Set.<module:engine/view/node~Node>}
 		 */
 		this.markedAttributes = new Set();
 
@@ -69,7 +69,7 @@ export default class Renderer {
 		 * Set of elements which child lists changed and may need to be rendered.
 		 *
 		 * @readonly
-		 * @member {Set.<module:engine/view/node~Node>} module:engine/view/renderer~Renderer#markedChildren
+		 * @member {Set.<module:engine/view/node~Node>}
 		 */
 		this.markedChildren = new Set();
 
@@ -77,7 +77,7 @@ export default class Renderer {
 		 * Set of text nodes which text data changed and may need to be rendered.
 		 *
 		 * @readonly
-		 * @member {Set.<module:engine/view/node~Node>} module:engine/view/renderer~Renderer#markedTexts
+		 * @member {Set.<module:engine/view/node~Node>}
 		 */
 		this.markedTexts = new Set();
 
@@ -85,7 +85,7 @@ export default class Renderer {
 		 * View selection. Renderer updates DOM Selection to make it match this one.
 		 *
 		 * @readonly
-		 * @member {module:engine/view/selection~Selection} module:engine/view/renderer~Renderer#selection
+		 * @member {module:engine/view/selection~Selection}
 		 */
 		this.selection = selection;
 
@@ -93,7 +93,7 @@ export default class Renderer {
 		 * The text node in which the inline filler was rendered.
 		 *
 		 * @private
-		 * @member {Text} module:engine/view/renderer~Renderer#_inlineFiller
+		 * @member {Text}
 		 */
 		this._inlineFiller = null;
 
@@ -101,7 +101,7 @@ export default class Renderer {
 		 * Indicates if view document is focused and selection can be rendered. Selection will not be rendered if
 		 * this is set to `false`.
 		 *
-		 * @member {Boolean} module:engine/view/renderer~Renderer#isFocused
+		 * @member {Boolean}
 		 */
 		this.isFocused = false;
 
@@ -119,9 +119,9 @@ export default class Renderer {
 	 *
 	 * Note that only view nodes which parents have corresponding DOM elements need to be marked to be synchronized.
 	 *
-	 * @see module:engine/view/renderer~Renderer#markedAttributes
-	 * @see module:engine/view/renderer~Renderer#markedChildren
-	 * @see module:engine/view/renderer~Renderer#markedTexts
+	 * @see #markedAttributes
+	 * @see #markedChildren
+	 * @see #markedTexts
 	 *
 	 * @param {module:engine/view/document~ChangeType} type Type of the change.
 	 * @param {module:engine/view/node~Node} node Node to be marked.
@@ -154,8 +154,8 @@ export default class Renderer {
 	}
 
 	/**
-	 * Render method checks {@link module:engine/view/renderer~Renderer#markedAttributes},
-	 * {@link module:engine/view/renderer~Renderer#markedChildren} and {@link module:engine/view/renderer~Renderer#markedTexts} and updates all
+	 * Render method checks {@link #markedAttributes},
+	 * {@link #markedChildren} and {@link #markedTexts} and updates all
 	 * nodes which need to be updated. Then it clears all three sets. Also, every time render is called it compares and
 	 * if needed updates the selection.
 	 *
@@ -170,7 +170,8 @@ export default class Renderer {
 	 * {@link module:engine/view/domconverter~DomConverter#getCorrespondingDomText corresponding DOM text}. The change will be handled
 	 * in the parent element.
 	 *
-	 * For elements, which child lists have changed, it calculates a {@link diff} and adds or removes children which have changed.
+	 * For elements, which child lists have changed, it calculates a {@link module:utils/diff~diff} and adds or removes children which have
+	 * changed.
 	 *
 	 * Rendering also handles {@link module:engine/view/filter~Filter fillers}. Especially, it checks if the inline filler is needed
 	 * at selection position and adds or removes it. To prevent breaking text composition inline filler will not be

+ 30 - 29
packages/ckeditor5-engine/src/view/selection.js

@@ -39,7 +39,7 @@ export default class Selection {
 		 * Stores all ranges that are selected.
 		 *
 		 * @protected
-		 * @member {Array.<module:engine/view/range~Range>} module:engine/view/selection~Selection#_ranges
+		 * @member {Array.<module:engine/view/range~Range>}
 		 */
 		this._ranges = [];
 
@@ -47,7 +47,7 @@ export default class Selection {
 		 * Specifies whether the last added range was added as a backward or forward range.
 		 *
 		 * @protected
-		 * @member {Boolean} module:engine/view/selection~Selection#_lastRangeBackward
+		 * @member {Boolean}
 		 */
 		this._lastRangeBackward = false;
 
@@ -55,7 +55,7 @@ export default class Selection {
 		 * Specifies whether selection instance is fake.
 		 *
 		 * @private
-		 * @member {Boolean} module:engine/view/selection~Selection#_isFake
+		 * @member {Boolean}
 		 */
 		this._isFake = false;
 
@@ -63,7 +63,7 @@ export default class Selection {
 		 * Fake selection's label.
 		 *
 		 * @private
-		 * @member {String} module:engine/view/selection~Selection#_fakeSelectionLabel
+		 * @member {String}
 		 */
 		this._fakeSelectionLabel = '';
 	}
@@ -76,7 +76,7 @@ export default class Selection {
 	 * Additionally fake's selection label can be provided. It will be used to describe fake selection in DOM (and be
 	 * properly handled by screen readers).
 	 *
-	 * @fires module:engine/view/selection~Selection#change
+	 * @fires change
 	 * @param {Boolean} [value=true] If set to true selection will be marked as `fake`.
 	 * @param {Object} [options] Additional options.
 	 * @param {String} [options.label=''] Fake selection label.
@@ -91,7 +91,7 @@ export default class Selection {
 	/**
 	 * Returns true if selection instance is marked as `fake`.
 	 *
-	 * @see {@link module:engine/view/selection~Selection#setFake}
+	 * @see {@link #setFake}
 	 * @returns {Boolean}
 	 */
 	get isFake() {
@@ -101,7 +101,7 @@ export default class Selection {
 	/**
 	 * Returns fake selection label.
 	 *
-	 * @see {@link module:engine/view/selection~Selection#setFake}
+	 * @see {@link #setFake}
 	 * @returns {String}
 	 */
 	get fakeSelectionLabel() {
@@ -110,11 +110,11 @@ export default class Selection {
 
 	/**
 	 * Selection anchor. Anchor may be described as a position where the selection starts. Together with
-	 * {@link module:engine/view/selection~Selection#focus focus} they define the direction of selection, which is important
+	 * {@link #focus focus} they define the direction of selection, which is important
 	 * when expanding/shrinking selection. Anchor is always the start or end of the most recent added range.
 	 * It may be a bit unintuitive when there are multiple ranges in selection.
 	 *
-	 * @see module:engine/view/selection~Selection#focus
+	 * @see #focus
 	 * @type {module:engine/view/position~Position}
 	 */
 	get anchor() {
@@ -130,7 +130,7 @@ export default class Selection {
 	/**
 	 * Selection focus. Focus is a position where the selection ends.
 	 *
-	 * @see module:engine/view/selection~Selection#anchor
+	 * @see #anchor
 	 * @type {module:engine/view/position~Position}
 	 */
 	get focus() {
@@ -163,8 +163,7 @@ export default class Selection {
 	}
 
 	/**
-	 * Specifies whether the {@link module:engine/view/selection~Selection#focus} precedes {@link
-	 * module:engine/view/selection~Selection#anchor}.
+	 * Specifies whether the {@link #focus} precedes {@link #anchor}.
 	 *
 	 * @type {Boolean}
 	 */
@@ -193,13 +192,12 @@ export default class Selection {
 	 * Accepts a flag describing in which way the selection is made - passed range might be selected from
 	 * {@link module:engine/view/range~Range#start start} to {@link module:engine/view/range~Range#end end}
 	 * or from {@link module:engine/view/range~Range#end end} to {@link module:engine/view/range~Range#start start}.
-	 * The flag is used to set {@link module:engine/view/selection~Selection#anchor anchor} and
-	 * {@link module:engine/view/selection~Selection#focus focus} properties.
+	 * The flag is used to set {@link #anchor anchor} and {@link #focus focus} properties.
 	 *
 	 * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-selection-range-intersects` if added range intersects
 	 * with ranges already stored in Selection instance.
 	 *
-	 * @fires module:engine/view/selection~Selection#change
+	 * @fires change
 	 * @param {module:engine/view/range~Range} range
 	 */
 	addRange( range, isBackward ) {
@@ -335,7 +333,7 @@ export default class Selection {
 	/**
 	 * Removes all ranges that were added to the selection.
 	 *
-	 * @fires module:engine/view/selection~Selection#change
+	 * @fires change
 	 */
 	removeAllRanges() {
 		if ( this._ranges.length ) {
@@ -346,11 +344,10 @@ export default class Selection {
 
 	/**
 	 * Replaces all ranges that were added to the selection with given array of ranges. Last range of the array
-	 * is treated like the last added range and is used to set {@link module:engine/view/selection~Selection#anchor anchor} and
-	 * {@link module:engine/view/selection~Selection#focus focus}. Accepts a flag describing in which way the selection is made
-	 * (see {@link module:engine/view/selection~Selection#addRange addRange}).
+	 * is treated like the last added range and is used to set {@link #anchor anchor} and {@link #focus focus}.
+	 * Accepts a flag describing in which way the selection is made (see {@link #addRange addRange}).
 	 *
-	 * @fires module:engine/view/selection~Selection#change
+	 * @fires change
 	 * @param {Array.<module:engine/view/range~Range>} newRanges Array of ranges to set.
 	 * @param {Boolean} [isLastBackward] Flag describing if last added range was selected forward - from start to end
 	 * (`false`) or backward - from end to start (`true`). Defaults to `false`.
@@ -387,7 +384,7 @@ export default class Selection {
 	 *
 	 * The location can be specified in the same form as {@link module:engine/view/position~Position.createAt} parameters.
 	 *
-	 * @fires module:engine/view/selection~Selection#change
+	 * @fires change
 	 * @param {module:engine/view/item~Item|module:engine/view/position~Position} itemOrPosition
 	 * @param {Number|'end'|'before'|'after'} [offset=0] Offset or one of the flags. Used only when
 	 * first parameter is a {@link module:engine/view/item~Item view item}.
@@ -400,11 +397,11 @@ export default class Selection {
 	}
 
 	/**
-	 * Collapses selection to the selection's {@link module:engine/view/selection~Selection#getFirstPosition first position}.
+	 * Collapses selection to the selection's {@link #getFirstPosition first position}.
 	 * All ranges, besides the collapsed one, will be removed. Nothing will change if there are no ranges stored
 	 * inside selection.
 	 *
-	 * @fires module:engine/view/selection~Selection#change
+	 * @fires change
 	 */
 	collapseToStart() {
 		const startPosition = this.getFirstPosition();
@@ -415,11 +412,11 @@ export default class Selection {
 	}
 
 	/**
-	 * Collapses selection to the selection's {@link module:engine/view/selection~Selection#getLastPosition last position}.
+	 * Collapses selection to the selection's {@link #getLastPosition last position}.
 	 * All ranges, besides the collapsed one, will be removed. Nothing will change if there are no ranges stored
 	 * inside selection.
 	 *
-	 * @fires module:engine/view/selection~Selection#change
+	 * @fires change
 	 */
 	collapseToEnd() {
 		const endPosition = this.getLastPosition();
@@ -430,11 +427,11 @@ export default class Selection {
 	}
 
 	/**
-	 * Sets {@link module:engine/view/selection~Selection#focus} to the specified location.
+	 * Sets {@link #focus} to the specified location.
 	 *
 	 * The location can be specified in the same form as {@link module:engine/view/position~Position.createAt} parameters.
 	 *
-	 * @fires module:engine/view/selection~Selection#change:range
+	 * @fires change:range
 	 * @param {module:engine/view/item~Item|module:engine/view/position~Position} itemOrPosition
 	 * @param {Number|'end'|'before'|'after'} [offset=0] Offset or one of the flags. Used only when
 	 * first parameter is a {@link module:engine/view/item~Item view item}.
@@ -532,7 +529,11 @@ export default class Selection {
 mix( Selection, EmitterMixin );
 
 /**
- * Fired whenever selection ranges are changed through {@link module:engine/view/selection~Selection Selection API}.
+ * Fired whenever selection ranges are changed through {@link ~Selection Selection API}.
  *
- * @event module:engine/view/selection~Selection#change
+ * @event change
+ */
+
+/**
+ * @event change:range
  */

+ 2 - 2
packages/ckeditor5-engine/src/view/text.js

@@ -26,7 +26,7 @@ export default class Text extends Node {
 		/**
 		 * The text content.
 		 *
-		 * Setting the data fires the {@link module:engine/view/node~Node#event:change change event}.
+		 * Setting the data fires the {@link module:engine/view/node~Node#event:change:text change event}.
 		 *
 		 * @private
 		 * @member {String} module:engine/view/text~Text#_data
@@ -46,7 +46,7 @@ export default class Text extends Node {
 	/**
 	 * The text content.
 	 *
-	 * Setting the data fires the {@link module:engine/view/node~Node#change change event}.
+	 * Setting the data fires the {@link module:engine/view/node~Node#event:change:text change event}.
 	 */
 	get data() {
 		return this._data;

+ 1 - 1
packages/ckeditor5-engine/src/view/view.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @module engine/view
+ * @module engine/view/view
  */

+ 1 - 1
packages/ckeditor5-engine/src/view/writer.js

@@ -20,7 +20,7 @@ import isIterable from '../../utils/isiterable.js';
 /**
  * Contains functions used for composing view tree.
  *
- * @namespace module:engine/view/writer~writer
+ * @namespace writer
  */
 
 export default {