浏览代码

Ported API docs to the new format.

Piotrek Koszuliński 9 年之前
父节点
当前提交
3d71d7261c

+ 20 - 15
packages/ckeditor5-core/src/command/command.js

@@ -3,6 +3,10 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module core/command/command
+ */
+
 import ObservableMixin from '../../utils/observablemixin.js';
 import mix from '../../utils/mix.js';
 
@@ -11,26 +15,26 @@ import mix from '../../utils/mix.js';
  *
  * Commands are main way to manipulate editor contents and state. They are mostly used by UI elements (or by other
  * commands) to make changes in Tree Model. Commands are available in every part of code that has access to
- * {@link core.editor.Editor} instance, since they are registered in it and executed through {@link core.editor.Editor#execute}.
- * Commands instances are available through {@link core.editor.Editor#commands}.
+ * {@link module:core/editor/editor~Editor} instance, since they are registered in it and executed through
+ * {@link module:core/editor/editor~Editor#execute}.
+ * Commands instances are available through {@link module:core/editor/editor~Editor#commands}.
  *
  * This is an abstract base class for all commands.
  *
- * @memberOf core.command
- * @mixes utils.ObservableMixin
+ * @mixes module:utils/observablemixin~ObservaleMixin
  */
 export default class Command {
 	/**
 	 * Creates a new Command instance.
 	 *
-	 * @param {core.editor.Editor} editor Editor on which this command will be used.
+	 * @param {module:core/editor/editor~Editor} editor Editor on which this command will be used.
 	 */
 	constructor( editor ) {
 		/**
 		 * Editor on which this command will be used.
 		 *
 		 * @readonly
-		 * @member {core.editor.Editor} core.command.Command#editor
+		 * @member {module:core/editor/editor~Editor} #editor
 		 */
 		this.editor = editor;
 
@@ -39,7 +43,7 @@ export default class Command {
 		 * A disabled command should do nothing upon it's execution.
 		 *
 		 * @observable
-		 * @member {Boolean} core.command.Command#isEnabled
+		 * @member {Boolean} #isEnabled
 		 */
 		this.set( 'isEnabled', true );
 
@@ -61,7 +65,7 @@ export default class Command {
 	 * Other parts of code might listen to `refreshState` event on this command and add their callbacks. This
 	 * way the responsibility of deciding whether a command should be enabled is shared.
 	 *
-	 * @fires {@link core.command.Command#refreshState refreshState}
+	 * @fires refreshState
 	 */
 	refreshState() {
 		const data = { isEnabled: true };
@@ -74,7 +78,7 @@ export default class Command {
 	 * Executes the command if it is enabled.
 	 *
 	 * @protected
-	 * @param {*} param Parameter passed to {@link core.command.Command#execute execute} method of this command.
+	 * @param {*} param Parameter passed to {@link #execute execute} method of this command.
 	 */
 	_execute( param ) {
 		if ( this.isEnabled ) {
@@ -95,8 +99,8 @@ export default class Command {
 
 	/**
 	 * Enables the command (internally). This should be used only by the command itself. Command will be enabled if
-	 * other listeners does not return false on `refreshState` event callbacks. Firing {@link core.command.Command#_enable}
-	 * does not guarantee that {@link core.command.Command#isEnabled} will be set to true, as it depends on other listeners.
+	 * other listeners does not return false on `refreshState` event callbacks. Firing {@link #_enable}
+	 * does not guarantee that {@link #isEnabled} will be set to true, as it depends on other listeners.
 	 *
 	 * @protected
 	 */
@@ -119,8 +123,9 @@ export default class Command {
 	 * If it is defined, it will be added as a callback to `refreshState` event.
 	 *
 	 * @protected
-	 * @method core.command.Command#_checkEnabled
-	 * @returns {Boolean} `true` if command should be enabled according to {@link engine.model.Document#schema}. `false` otherwise.
+	 * @method #_checkEnabled
+	 * @returns {Boolean} `true` if command should be enabled according to
+	 * {@link module:engine/model/document~Document#schema}. `false` otherwise.
 	 */
 }
 
@@ -131,11 +136,11 @@ function disableCallback( evt, data ) {
 mix( Command, ObservableMixin );
 
 /**
- * Fired whenever command has to have its {@link core.command.Command#isEnabled} property refreshed. Every feature,
+ * Fired whenever command has to have its {@link #isEnabled} property refreshed. Every feature,
  * command or other class which needs to disable command (set `isEnabled` to `false`) should listen to this
  * event.
  *
- * @event core.command.Command#refreshState
+ * @event refreshState
  * @param {Object} data
  * @param {Boolean} [data.isEnabled=true]
  */

+ 7 - 3
packages/ckeditor5-core/src/command/helpers/getschemavalidranges.js

@@ -3,6 +3,10 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module core/command/helpers/getschemavalidranges
+ */
+
 import TreeWalker from '../../../engine/model/treewalker.js';
 import Range from '../../../engine/model/range.js';
 
@@ -11,9 +15,9 @@ import Range from '../../../engine/model/range.js';
  * attribute set. This is done by breaking a range in two and omitting the not allowed part.
  *
  * @param {String} attribute Attribute key.
- * @param {Array.<engine.model.Range>} ranges Ranges to be validated.
- * @param {engine.model.Schema} schema Document schema.
- * @returns {Array.<engine.model.Range>} Ranges without invalid parts.
+ * @param {Array.<module:engine/model/range~Range>} ranges Ranges to be validated.
+ * @param {module:engine/model/schema~Schema} schema Document schema.
+ * @returns {Array.<module:engine/model/range~Range>} Ranges without invalid parts.
  */
 export default function getSchemaValidRanges( attribute, ranges, schema ) {
 	const validRanges = [];

+ 8 - 3
packages/ckeditor5-core/src/command/helpers/isattributeallowedinselection.js

@@ -3,16 +3,21 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module core/command/helpers/isattributeallowedinselection
+ */
+
 import TreeWalker from '../../../engine/model/treewalker.js';
 
 /**
- * Checks {@link engine.model.Document#schema} if attribute is allowed in selection:
+ * Checks {@link module:engine/model/document~Document#schema} if attribute is allowed in selection:
+ *
  * * if selection is on range, the command is enabled if any of nodes in that range can have bold,
  * * if selection is collapsed, the command is enabled if text with bold is allowed in that node.
  *
  * @param {String} attribute Attribute key.
- * @param {engine.model.Selection} selection Selection which ranges will be validate.
- * @param {engine.model.Schema} schema Document schema.
+ * @param {module:engine/model/selection~Selection} selection Selection which ranges will be validate.
+ * @param {module:engine/model/schema~Schema} schema Document schema.
  * @returns {Boolean}
  */
 export default function isAttributeAllowedInSelection( attribute, selection, schema ) {

+ 18 - 17
packages/ckeditor5-core/src/command/toggleattributecommand.js

@@ -3,25 +3,25 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module core/command/toggleattributecommand
+ */
+
 import Command from './command.js';
 import getSchemaValidRanges from './helpers/getschemavalidranges.js';
 import isAttributeAllowedInSelection from './helpers/isattributeallowedinselection.js';
 
 /**
- * An extension of basic {@link core.command.Command} class, which provides utilities for a command that toggle a single
- * attribute on a text or element with value `true`. ToggleAttributeCommand uses {@link engine.model.Document#selection}
+ * An extension of the base {@link module:core/command/command~Command} class, which provides utilities for a command which toggles a single
+ * attribute on a text or an element. `ToggleAttributeCommand` uses {@link module:engine/model/document~Document#selection}
  * to decide which nodes (if any) should be changed, and applies or removes attributes from them.
- * See {@link engine.view.Converter#execute} for more.
- *
- * The command checks {@link engine.model.Document#schema} to decide if it should be enabled.
- * See {@link engine.view.Converter#checkSchema} for more.
  *
- * @memberOf core.command
+ * The command checks {@link module:engine/model/document~Document#schema} to decide if it should be enabled.
  */
 export default class ToggleAttributeCommand extends Command {
 	/**
-	 * @see core.command.Command
-	 * @param {core.editor.Editor} editor
+	 * @see module:core/command/command~Command
+	 * @param {module:core/editor/editor~Editor} editor
 	 * @param {String} attributeKey Attribute that will be set by the command.
 	 */
 	constructor( editor, attributeKey ) {
@@ -30,7 +30,7 @@ export default class ToggleAttributeCommand extends Command {
 		/**
 		 * Attribute that will be set by the command.
 		 *
-		 * @member {String} core.command.ToggleAttributeCommand#attributeKey
+		 * @member {String}
 		 */
 		this.attributeKey = attributeKey;
 
@@ -39,7 +39,7 @@ export default class ToggleAttributeCommand extends Command {
 		 * the command's attribute set. For range selection it means that all nodes inside have the attribute applied.
 		 *
 		 * @observable
-		 * @member {Boolean} core.command.ToggleAttributeCommand#value
+		 * @member {Boolean} #value
 		 */
 		this.set( 'value', false );
 
@@ -49,7 +49,8 @@ export default class ToggleAttributeCommand extends Command {
 	}
 
 	/**
-	 * Checks if {@link engine.model.Document#schema} allows to create attribute in {@link engine.model.Document#selection}
+	 * Checks if {@link module:engine/model/document~Document#schema} allows to create attribute in
+	 * {@link module:engine/model/document~Document#selection}.
 	 *
 	 * @private
 	 * @returns {Boolean}
@@ -65,11 +66,11 @@ export default class ToggleAttributeCommand extends Command {
 	 *
 	 * If the command is active (`value == true`), it will remove attributes. Otherwise, it will set attributes.
 	 *
-	 * The execution result differs, depending on the {@link engine.model.Document#selection}:
+	 * The execution result differs, depending on the {@link module:engine/model/document~Document#selection}:
 	 * * if selection is on a range, the command applies the attribute on all nodes in that ranges
-	 * (if they are allowed to have this attribute by the {@link engine.model.Schema schema}),
-	 * * if selection is collapsed in non-empty node, the command applies attribute to the {@link engine.model.Document#selection}
-	 * itself (note that typed characters copy attributes from selection),
+	 * (if they are allowed to have this attribute by the {@link module:engine/model/schema~Schema schema}),
+	 * * if selection is collapsed in non-empty node, the command applies attribute to the
+	 * {@link module:engine/model/document~Document#selection} itself (note that typed characters copy attributes from selection),
 	 * * if selection is collapsed in empty node, the command applies attribute to the parent node of selection (note
 	 * that selection inherits all attributes from a node if it is in empty node).
 	 *
@@ -79,7 +80,7 @@ export default class ToggleAttributeCommand extends Command {
 	 * @param {Object} [options] Options of command.
 	 * @param {Boolean} [options.forceValue] If set it will force command behavior. If `true`, command will apply attribute,
 	 * otherwise command will remove attribute. If not set, command will look for it's current value to decide what it should do.
-	 * @param {engine.model.Batch} [options.batch] Batch to group undo steps.
+	 * @param {module:engine/model/batch~Batch} [options.batch] Batch to group undo steps.
 	 */
 	_doExecute( options = {} ) {
 		const document = this.editor.document;

+ 23 - 20
packages/ckeditor5-core/src/editor/editor.js

@@ -3,6 +3,10 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module core/editor/editor
+ */
+
 import EmitterMixin from '../../utils/emittermixin.js';
 import Config from '../../utils/config.js';
 import PluginCollection from '../plugincollection.js';
@@ -16,10 +20,9 @@ import mix from '../../utils/mix.js';
 /**
  * Class representing a basic editor. It contains a base architecture, without much additional logic.
  *
- * See also {@link core.editor.StandardEditor}.
+ * See also {@link module:core/editor/editor~StandardEditor}.
  *
- * @memberOf core.editor
- * @mixes utils.EmitterMixin
+ * @mixes module:utils/emittermixin~EmitterMixin
  */
 export default class Editor {
 	/**
@@ -32,7 +35,7 @@ export default class Editor {
 		 * Holds all configurations specific to this editor instance.
 		 *
 		 * @readonly
-		 * @member {utils.Config} core.editor.Editor#config
+		 * @member {utils.Config}
 		 */
 		this.config = new Config( config );
 
@@ -40,7 +43,7 @@ export default class Editor {
 		 * The plugins loaded and in use by this editor instance.
 		 *
 		 * @readonly
-		 * @member {core.PluginCollection} core.editor.Editor#plugins
+		 * @member {module:core/plugin~PluginCollection}
 		 */
 		this.plugins = new PluginCollection( this );
 
@@ -48,21 +51,21 @@ export default class Editor {
 		 * Commands registered to the editor.
 		 *
 		 * @readonly
-		 * @member {Map.<core.command.Command>} core.editor.Editor#commands
+		 * @member {Map.<module:core/command/command~Command>}
 		 */
 		this.commands = new Map();
 
 		/**
 		 * @readonly
-		 * @member {utils.Locale} core.editor.Editor#locale
+		 * @member {module:utils/locale~Locale}
 		 */
 		this.locale = new Locale( this.config.get( 'lang' ) );
 
 		/**
-		 * Shorthand for {@link utils.Locale#t}.
+		 * Shorthand for {@link module:utils/locale~Locale#t}.
 		 *
-		 * @see utils.Locale#t
-		 * @method core.editor.Editor#t
+		 * @see module:utils/locale~Locale#t
+		 * @method #t
 		 */
 		this.t = this.locale.t;
 
@@ -70,29 +73,29 @@ export default class Editor {
 		 * Tree Model document managed by this editor.
 		 *
 		 * @readonly
-		 * @member {engine.model.Document} core.editor.Editor#document
+		 * @member {module:engine/model/document~Document}
 		 */
 		this.document = new Document();
 
 		/**
-		 * Instance of the {@link engine.controller.DataController data controller}.
+		 * Instance of the {@link module:engine/controller/datacontroller~DataController data controller}.
 		 *
 		 * @readonly
-		 * @member {engine.controller.DataController} core.editor.Editor#data
+		 * @member {module:engine/controller.DataController}
 		 */
 		this.data = new DataController( this.document );
 
 		/**
-		 * Instance of the {@link engine.controller.EditingController editing controller}.
+		 * Instance of the {@link module:engine/controller/editingcontroller~EditingController editing controller}.
 		 *
-		 * This property is set by more specialized editor classes (such as {@link core.editor.StandardEditor}),
+		 * This property is set by more specialized editor classes (such as {@link module:core/editor/editor~StandardEditor}),
 		 * however, it's required for features to work as their engine-related parts will try to connect converters.
 		 *
 		 * When defining a virtual editor class, like one working in Node.js, it's possible to plug a virtual
 		 * editing controller which only instantiates necessary properties, but without any observers and listeners.
 		 *
 		 * @readonly
-		 * @member {engine.controller.EditingController} core.editor.Editor#editing
+		 * @member {module:engine/controller/editingcontroller~EditingController} #editing
 		 */
 	}
 
@@ -122,7 +125,7 @@ export default class Editor {
 	/**
 	 * Destroys the editor instance, releasing all resources used by it.
 	 *
-	 * @fires core.editor.Editor#destroy
+	 * @fires module:core/editor/editor~Editor#destroy
 	 * @returns {Promise} A promise that resolves once the editor instance is fully destroyed.
 	 */
 	destroy() {
@@ -160,9 +163,9 @@ export default class Editor {
 	/**
 	 * Creates a basic editor instance.
 	 *
-	 * @param {Object} config See {@link core.editor.StandardEditor}'s param.
+	 * @param {Object} config See {@link module:core/editor/editor~StandardEditor}'s param.
 	 * @returns {Promise} Promise resolved once editor is ready.
-	 * @returns {core.editor.StandardEditor} return.editor The editor instance.
+	 * @returns {module:core/editor/editor~StandardEditor} return.editor The editor instance.
 	 */
 	static create( config ) {
 		return new Promise( ( resolve ) => {
@@ -182,5 +185,5 @@ mix( Editor, EmitterMixin );
  * Fired when this editor instance is destroyed. The editor at this point is not usable and this event should be used to
  * perform the clean-up in any plugin.
  *
- * @event core.editor.Editor#destroy
+ * @event module:core/editor/editor~Editor#destroy
  */

+ 9 - 5
packages/ckeditor5-core/src/editor/editorui.jsdoc

@@ -4,24 +4,28 @@
  */
 
 /**
+ * @module core/editor/editorui
+ */
+
+/**
  * Minimal interface that is required to successfully bootstrap any editor UI.
  *
- * @interface core.editor.EditorUI
+ * @interface EditorUI
  */
 
 /**
  * The main (top–most) view of the editor UI.
  *
  * @readonly
- * @member {ui.editorUI.EditorUIView} core.editor.EditorUI#view
+ * @member {module:ui/editorui/editoruiview~EditorUIView} #view
  */
 
 /**
- * Instance of the {@link ui.ComponentFactory}, a registry used by plugins
+ * Instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins
  * to register factories of specific UI components.
  *
  * @readonly
- * @member {ui.ComponentFactory} core.editor.EditorUI#componentFactory
+ * @member {module:ui/componentfactory~ComponentFactory} #componentFactory
  */
 
 /**
@@ -29,5 +33,5 @@
  * unifying them in a uniform focus group.
  *
  * @readonly
- * @member {utils.FocusTracker} core.editor.EditorUI#focusTracker
+ * @member {module:utils/focustracker~FocusTracker} #focusTracker
  */

+ 14 - 12
packages/ckeditor5-core/src/editor/standardeditor.js

@@ -3,6 +3,10 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module core/editor/standardeditor
+ */
+
 import Editor from './editor.js';
 import KeystrokeHandler from '../keystrokehandler.js';
 import EditingController from '../../engine/controller/editingcontroller.js';
@@ -12,9 +16,7 @@ import setDataInElement from '../../utils/dom/setdatainelement.js';
 
 /**
  * Class representing a typical browser-based editor. It handles a single source element and
- * uses {@link engine.controller.EditingController}.
- *
- * @memberOf core.editor
+ * uses {@link module:engine/controller/editingcontroller~EditingController}.
  */
 export default class StandardEditor extends Editor {
 	/**
@@ -31,7 +33,7 @@ export default class StandardEditor extends Editor {
 		 * The element on which the editor has been initialized.
 		 *
 		 * @readonly
-		 * @member {HTMLElement} core.editor.StandardEditor#element
+		 * @member {HTMLElement}
 		 */
 		this.element = element;
 
@@ -39,10 +41,10 @@ export default class StandardEditor extends Editor {
 		this.editing = new EditingController( this.document );
 
 		/**
-		 * Instance of the {@link core.KeystrokeHandler}.
+		 * Instance of the {@link module:core/keystrokehandler~KeystrokeHandler}.
 		 *
 		 * @readonly
-		 * @member {core.KeystrokeHandler} core.editor.StandardEditor#keystrokes
+		 * @member {module:core/keystrokehandler~KeystrokeHandler}
 		 */
 		this.keystrokes = new KeystrokeHandler( this );
 
@@ -54,7 +56,7 @@ export default class StandardEditor extends Editor {
 		 * so every editor class which is meant to work with default plugins should set this property.
 		 *
 		 * @readonly
-		 * @member {core.editor.EditorUI} core.editor.StandardEditor#ui
+		 * @member {module:core/editor/editorui~EditorUI} #ui
 		 */
 	}
 
@@ -84,14 +86,14 @@ export default class StandardEditor extends Editor {
 	}
 
 	/**
-	 * Updates the {@link core.editor.StandardEditor#element editor element}'s content with the data.
+	 * Updates the {@link #element editor element}'s content with the data.
 	 */
 	updateEditorElement() {
 		setDataInElement( this.element, this.getData() );
 	}
 
 	/**
-	 * Loads the data from the {@link core.editor.StandardEditor#element editor element} to the main root.
+	 * Loads the data from the {@link #element editor element} to the main root.
 	 */
 	loadDataFromEditorElement() {
 		this.setData( getDataFromElement( this.element ) );
@@ -100,10 +102,10 @@ export default class StandardEditor extends Editor {
 	/**
 	 * Creates a standard editor instance.
 	 *
-	 * @param {HTMLElement} element See {@link core.editor.StandardEditor}'s param.
-	 * @param {Object} config See {@link core.editor.StandardEditor}'s param.
+	 * @param {HTMLElement} element See {@link module:core/editor/standardeditor~StandardEditor}'s param.
+	 * @param {Object} config See {@link module:core/editor/standardeditor~StandardEditor}'s param.
 	 * @returns {Promise} Promise resolved once editor is ready.
-	 * @returns {core.editor.StandardEditor} return.editor The editor instance.
+	 * @returns {module:core/editor/standardeditor~StandardEditor} return.editor The editor instance.
 	 */
 	static create( element, config ) {
 		return new Promise( ( resolve ) => {

+ 13 - 11
packages/ckeditor5-core/src/keystrokehandler.js

@@ -3,11 +3,15 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module core/keystrokehandler
+ */
+
 import EmitterMixin from '../utils/emittermixin.js';
 import { getCode, parseKeystroke } from '../utils/keyboard.js';
 
 /**
- * Keystroke handler. Its instance is available in {@link core.editor.Editor#keystrokes} so plugins
+ * Keystroke handler. Its instance is available in {@link module:core/editor/editor~Editor#keystrokes} so plugins
  * can register their keystrokes.
  *
  * E.g. an undo plugin would do this:
@@ -15,21 +19,19 @@ import { getCode, parseKeystroke } from '../utils/keyboard.js';
  *		editor.keystrokes.set( 'ctrl + Z', 'undo' );
  *		editor.keystrokes.set( 'ctrl + shift + Z', 'redo' );
  *		editor.keystrokes.set( 'ctrl + Y', 'redo' );
- *
- * @memberOf core
  */
 export default class KeystrokeHandler {
 	/**
 	 * Creates an instance of the keystroke handler.
 	 *
-	 * @param {engine.treeView.TreeView} editingView
+	 * @param {module:core/editor/editor~Editor} editor
 	 */
 	constructor( editor ) {
 		/**
 		 * The editor instance.
 		 *
 		 * @readonly
-		 * @member {core.editor.Editor} core.KeystrokeHandler#editor
+		 * @member {module:core/editor/editor~Editor}
 		 */
 		this.editor = editor;
 
@@ -37,7 +39,7 @@ export default class KeystrokeHandler {
 		 * Listener used to listen to events for easier keystroke handler destruction.
 		 *
 		 * @private
-		 * @member {utils.Emitter} core.KeystrokeHandler#_listener
+		 * @member {module:utils/emittermixin~Emitter}
 		 */
 		this._listener = Object.create( EmitterMixin );
 
@@ -45,7 +47,7 @@ export default class KeystrokeHandler {
 		 * Map of the defined keystrokes. Keystroke codes are the keys.
 		 *
 		 * @private
-		 * @member {Map} core.KeystrokeHandler#_keystrokes
+		 * @member {Map}
 		 */
 		this._keystrokes = new Map();
 
@@ -64,11 +66,11 @@ export default class KeystrokeHandler {
 	 * The handler can be specified as a command name or a callback.
 	 *
 	 * @param {String|Array.<String|Number>} keystroke Keystroke defined in a format accepted by
-	 * the {@link utils.keyboard.parseKeystroke} function.
+	 * the {@link module:utils/keyboard~parseKeystroke} function.
 	 * @param {String|Function} callback If a string is passed, then the keystroke will
-	 * {@link core.editor.Editor#execute execute a command}.
+	 * {@link module:core/editor/editor~Editor#execute execute a command}.
 	 * If a function, then it will be called with the
-	 * {@link engine.view.observer.keyObserver.KeyEventData key event data} object.
+	 * {@link module:engine/view/observer/keyobserver~KeyEventData key event data} object.
 	 */
 	set( keystroke, callback ) {
 		this._keystrokes.set( parseKeystroke( keystroke ), callback );
@@ -77,7 +79,7 @@ export default class KeystrokeHandler {
 	/**
 	 * Triggers a keystroke handler for a specified key combination, if such a keystroke was {@link #set defined}.
 	 *
-	 * @param {engine.view.observer.keyObserver.KeyEventData} keyEventData Key event data.
+	 * @param {module:engine/view/observer/keyobserver~KeyEventData} keyEventData Key event data.
 	 * @returns {Boolean} Whether the keystroke was handled.
 	 */
 	press( keyEventData ) {

+ 11 - 7
packages/ckeditor5-core/src/plugin.js

@@ -3,27 +3,30 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module core/plugin
+ */
+
 import ObservableMixin from '../utils/observablemixin.js';
 import mix from '../utils/mix.js';
 
 /**
  * The base class for CKEditor plugin classes.
  *
- * @memberOf core
- * @mixes utils.ObservaleMixin
+ * @mixes module:utils/observablemixin~ObservaleMixin
  */
 export default class Plugin {
 	/**
 	 * Creates a new Plugin instance.
 	 *
-	 * @param {core.editor.Editor} editor
+	 * @param {module:core/editor/editor~Editor} editor
 	 */
 	constructor( editor ) {
 		/**
 		 * The editor instance.
 		 *
 		 * @readonly
-		 * @member {core.editor.Editor} core.Plugin#editor
+		 * @member {module:core/editor/editor~Editor} module:core/plugin~Plugin#editor
 		 */
 		this.editor = editor;
 	}
@@ -42,11 +45,12 @@ export default class Plugin {
 	 *		}
 	 *
 	 * @static
-	 * @member {Function[]|undefined} core.Plugin.requires
+	 * @member {Array.<Function>|undefined} module:core/plugin~Plugin.requires
 	 */
 
 	/**
-	 * Optional name of the plugin. If set, the plugin will be available in {@link PluginCollection#get} by its
+	 * Optional name of the plugin. If set, the plugin will be available in
+	 * {@link module:core/plugincollection~PluginCollection#get} by its
 	 * name and its constructor. If not, then only by its constructor.
 	 *
 	 * The name should reflect the package name + path to that module. E.g. `ckeditor5-image/src/image.js` plugin
@@ -63,7 +67,7 @@ export default class Plugin {
 	 *		}
 	 *
 	 * @static
-	 * @member {String|undefined} core.Plugin.pluginName
+	 * @member {String|undefined} module:core/plugin~Plugin.pluginName
 	 */
 
 	/**

+ 13 - 11
packages/ckeditor5-core/src/plugincollection.js

@@ -3,31 +3,33 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module core/plugincollection
+ */
+
 import Plugin from './plugin.js';
 import CKEditorError from '../utils/ckeditorerror.js';
 import log from '../utils/log.js';
 
 /**
  * Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.
- *
- * @memberOf core
  */
 export default class PluginCollection {
 	/**
 	 * Creates an instance of the PluginCollection class, initializing it with a set of plugins.
 	 *
-	 * @param {core.editor.Editor} editor
+	 * @param {module:core/editor/editor~Editor} editor
 	 */
 	constructor( editor ) {
 		/**
 		 * @protected
-		 * @member {core.editor.Editor} core.PluginCollection#_editor
+		 * @member {module:core/editor/editor~Editor} module:core/plugin~PluginCollection#_editor
 		 */
 		this._editor = editor;
 
 		/**
 		 * @protected
-		 * @member {Map} core.PluginCollection#_plugins
+		 * @member {Map} module:core/plugin~PluginCollection#_plugins
 		 */
 		this._plugins = new Map();
 	}
@@ -46,8 +48,8 @@ export default class PluginCollection {
 	/**
 	 * Gets the plugin instance by its constructor or name.
 	 *
-	 * @param {Function|String} key The plugin constructor or {@link core.Plugin.plugiName name}.
-	 * @returns {core.Plugin}
+	 * @param {Function|String} key The plugin constructor or {@link module:core/plugin~Plugin.plugiName name}.
+	 * @returns {module:core/plugin~Plugin}
 	 */
 	get( key ) {
 		return this._plugins.get( key );
@@ -56,10 +58,10 @@ export default class PluginCollection {
 	/**
 	 * Loads a set of plugins and add them to the collection.
 	 *
-	 * @param {Function[]} plugins An array of {@link core.Plugin plugin constructors}.
+	 * @param {Function[]} plugins An array of {@link module:core/plugin~Plugin plugin constructors}.
 	 * @returns {Promise} A promise which gets resolved once all plugins are loaded and available into the
 	 * collection.
-	 * @param {core.Plugin[]} returns.loadedPlugins The array of loaded plugins.
+	 * @param {Array.<module:core/plugin~Plugin>} returns.loadedPlugins The array of loaded plugins.
 	 */
 	load( plugins ) {
 		const that = this;
@@ -111,7 +113,7 @@ export default class PluginCollection {
 		function assertIsPlugin( PluginConstructor ) {
 			if ( !( PluginConstructor.prototype instanceof Plugin ) ) {
 				/**
-				 * The loaded plugin module is not an instance of {@link core.Plugin}.
+				 * The loaded plugin module is not an instance of {@link module:core/plugin~Plugin}.
 				 *
 				 * @error plugincollection-instance
 				 * @param {*} plugin The constructor which is meant to be loaded as a plugin.
@@ -129,7 +131,7 @@ export default class PluginCollection {
 	 *
 	 * @protected
 	 * @param {Function} PluginConstructor The plugin constructor.
-	 * @param {core.Plugin} plugin The instance of the plugin.
+	 * @param {module:core/plugin~Plugin} plugin The instance of the plugin.
 	 */
 	_add( PluginConstructor, plugin ) {
 		this._plugins.set( PluginConstructor, plugin );