Piotrek Koszuliński před 9 roky
rodič
revize
489cd8c7b4

+ 1 - 0
ckeditor.js

@@ -74,6 +74,7 @@ const CKEDITOR = {
 	/**
 	 * Holds global configuration defaults, which will be used by editor instances when such configurations are not
 	 * available on them directly.
+	 *
 	 * @member {utils.Config} CKEDITOR.config
 	 */
 	config: new Config()

+ 6 - 6
src/command/attributecommand.js

@@ -10,7 +10,7 @@ import TreeWalker from '../core/treemodel/treewalker.js';
 import Range from '../core/treemodel/range.js';
 
 /**
- * An extension of basic {@link core.command.Command} class, which provides utilities for a command that sets a single
+ * An extension of basic {@link ckeditor5.command.Command} class, which provides utilities for a command that sets a single
  * attribute on a text or element with value `true`. AttributeCommand uses {@link core.treeModel.Document#selection} to
  * decide which nodes (if any) should be changed, and applies or removes attributes from them.
  * See {@link core.treeView.Converter#execute} for more.
@@ -18,12 +18,12 @@ import Range from '../core/treemodel/range.js';
  * The command checks {@link core.treeModel.Document#schema} to decide if it should be enabled.
  * See {@link core.treeView.Converter#checkSchema} for more.
  *
- * @memberOf core.command
+ * @memberOf ckeditor5.command
  */
 export default class AttributeCommand extends Command {
 	/**
-	 * @see core.command.Command
-	 * @param {core.Editor} editor
+	 * @see ckeditor5.command.Command
+	 * @param {ckeditor5.Editor} editor
 	 * @param {String} attributeKey Attribute that will be set by the command.
 	 */
 	constructor( editor, attributeKey ) {
@@ -32,7 +32,7 @@ export default class AttributeCommand extends Command {
 		/**
 		 * Attribute that will be set by the command.
 		 *
-		 * @member {String} core.command.AttributeCommand#attributeKey
+		 * @member {String} ckeditor5.command.AttributeCommand#attributeKey
 		 */
 		this.attributeKey = attributeKey;
 
@@ -40,7 +40,7 @@ export default class AttributeCommand extends Command {
 		 * Flag indicating whether command is active. For collapsed selection it means that typed characters will have
 		 * the command's attribute set. For range selection it means that all nodes inside have the attribute applied.
 		 *
-		 * @member {Boolean} core.command.AttributeCommand#value
+		 * @member {Boolean} ckeditor5.command.AttributeCommand#value
 		 */
 		this.set( 'value', false );
 

+ 13 - 13
src/command/command.js

@@ -13,25 +13,25 @@ import utils from '../utils/utils.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} instance, since they are registered in it and executed through {@link core.Editor#execute}.
- * Commands instances are available through {@link core.Editor#commands}.
+ * {@link ckeditor5.Editor} instance, since they are registered in it and executed through {@link ckeditor5.Editor#execute}.
+ * Commands instances are available through {@link ckeditor5.Editor#commands}.
  *
  * This is an abstract base class for all commands.
  *
- * @memberOf core.command
+ * @memberOf ckeditor5.command
  * @mixes utils.ObservableMixin
  */
 export default class Command {
 	/**
 	 * Creates a new Command instance.
 	 *
-	 * @param {core.Editor} editor Editor on which this command will be used.
+	 * @param {ckeditor5.Editor} editor Editor on which this command will be used.
 	 */
 	constructor( editor ) {
 		/**
 		 * Editor on which this command will be used.
 		 *
-		 * @member {core.Editor} core.command.Command#editor
+		 * @member {ckeditor5.Editor} ckeditor5.command.Command#editor
 		 */
 		this.editor = editor;
 
@@ -39,7 +39,7 @@ export default class Command {
 		 * Flag indicating whether a command is enabled or disabled.
 		 * A disabled command should do nothing upon it's execution.
 		 *
-		 * @member {Boolean} core.command.Command#isEnabled
+		 * @member {Boolean} ckeditor5.command.Command#isEnabled
 		 */
 		this.set( 'isEnabled', true );
 
@@ -58,7 +58,7 @@ export default class Command {
 	 * If it is defined, it will be added as a callback to `refreshState` event.
 	 *
 	 * @protected
-	 * @method core.command.Command#_checkEnabled
+	 * @method ckeditor5.command.Command#_checkEnabled
 	 * @returns {Boolean} `true` if command should be enabled according to {@link core.treeModel.Document#schema}. `false` otherwise.
 	 */
 
@@ -67,7 +67,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 {@link ckeditor5.command.Command#refreshState refreshState}
 	 */
 	refreshState() {
 		const data = { isEnabled: true };
@@ -80,7 +80,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 ckeditor5.command.Command#execute execute} method of this command.
 	 */
 	_execute( param ) {
 		if ( this.isEnabled ) {
@@ -101,8 +101,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 ckeditor5.command.Command#_enable}
+	 * does not guarantee that {@link ckeditor5.command.Command#isEnabled} will be set to true, as it depends on other listeners.
 	 *
 	 * @protected
 	 */
@@ -127,11 +127,11 @@ function disableCallback( evt, data ) {
 utils.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 ckeditor5.command.Command#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 ckeditor5.command.Command#refreshState
  * @param {Object} data
  * @param {Boolean} [data.isEnabled=true]
  */

+ 9 - 9
src/creator.js

@@ -10,15 +10,15 @@ import Plugin from './plugin.js';
 /**
  * Basic creator class.
  *
- * @memberOf core
- * @extends core.Plugin
+ * @memberOf ckeditor5
+ * @extends ckeditor5.Plugin
  */
 export default class Creator extends Plugin {
 	/**
-	 * The element used to {@link core.Creator#_replaceElement _replaceElement} the editor element.
+	 * The element used to {@link ckeditor5.Creator#_replaceElement _replaceElement} the editor element.
 	 *
 	 * @private
-	 * @member {HTMLElement} core.Creator#_elementReplacement
+	 * @member {HTMLElement} ckeditor5.Creator#_elementReplacement
 	 */
 
 	/**
@@ -62,7 +62,7 @@ export default class Creator extends Plugin {
 	}
 
 	/**
-	 * Updates the {@link core.Editor#element editor element}'s content with the data.
+	 * Updates the {@link ckeditor5.Editor#element editor element}'s content with the data.
 	 *
 	 */
 	updateEditorElement() {
@@ -70,7 +70,7 @@ export default class Creator extends Plugin {
 	}
 
 	/**
-	 * Loads the data from the {@link core.Editor#element editor element} to the editable.
+	 * Loads the data from the {@link ckeditor5.Editor#element editor element} to the editable.
 	 *
 	 */
 	loadDataFromEditorElement() {
@@ -106,10 +106,10 @@ export default class Creator extends Plugin {
 	}
 
 	/**
-	 * Hides the {@link core.Editor#element editor element} and inserts the the given element
+	 * Hides the {@link ckeditor5.Editor#element editor element} and inserts the the given element
 	 * (usually, editor's UI main element) next to it.
 	 *
-	 * The effect of this method will be automatically reverted by {@link core.Creator#destroy destroy}.
+	 * The effect of this method will be automatically reverted by {@link ckeditor5.Creator#destroy destroy}.
 	 *
 	 * @protected
 	 * @param {HTMLElement} [newElement] The replacement element. If not passed, then the main editor's UI view element
@@ -129,7 +129,7 @@ export default class Creator extends Plugin {
 	}
 
 	/**
-	 * Restores what the {@link core.Creator#_replaceElement _replaceElement} did.
+	 * Restores what the {@link ckeditor5.Creator#_replaceElement _replaceElement} did.
 	 *
 	 * @protected
 	 */

+ 11 - 12
src/editor.js

@@ -17,7 +17,7 @@ import utils from './utils/utils.js';
 /**
  * Represents a single editor instance.
  *
- * @memberOf core
+ * @memberOf ckeditor5
  * @mixes utils.ObservaleMixin
  */
 export default class Editor {
@@ -36,7 +36,7 @@ export default class Editor {
 		 * editor creation and is not subject to be modified.
 		 *
 		 * @readonly
-		 * @member {HTMLElement} core.Editor#element
+		 * @member {HTMLElement} ckeditor5.Editor#element
 		 */
 		this.element = element;
 
@@ -48,7 +48,7 @@ export default class Editor {
 		 * instance itself.
 		 *
 		 * @readonly
-		 * @member {utils.Config} core.Editor#config
+		 * @member {utils.Config} ckeditor5.Editor#config
 		 */
 		this.config = config = new EditorConfig( config );
 
@@ -56,7 +56,7 @@ export default class Editor {
 		 * The plugins loaded and in use by this editor instance.
 		 *
 		 * @readonly
-		 * @member {core.PluginCollection} core.Editor#plugins
+		 * @member {ckeditor5.PluginCollection} ckeditor5.Editor#plugins
 		 */
 		this.plugins = new PluginCollection( this );
 
@@ -64,7 +64,7 @@ export default class Editor {
 		 * Tree Model document managed by this editor.
 		 *
 		 * @readonly
-		 * @member {core.treeModel.Document} core.Editor#document
+		 * @member {core.treeModel.Document} ckeditor5.Editor#document
 		 */
 		this.document = new Document();
 
@@ -72,13 +72,13 @@ export default class Editor {
 		 * Commands registered to the editor.
 		 *
 		 * @readonly
-		 * @member {Map} core.Editor#commands
+		 * @member {Map} ckeditor5.Editor#commands
 		 */
 		this.commands = new Map();
 
 		/**
 		 * @readonly
-		 * @member {utils.Locale} core.Editor#locale
+		 * @member {utils.Locale} ckeditor5.Editor#locale
 		 */
 		this.locale = new Locale( config.lang );
 
@@ -86,7 +86,7 @@ export default class Editor {
 		 * Shorthand for {@link utils.Locale#t}.
 		 *
 		 * @see utils.Locale#t
-		 * @method core.Editor#t
+		 * @method ckeditor5.Editor#t
 		 */
 		this.t = this.locale.t;
 
@@ -94,7 +94,7 @@ export default class Editor {
 		 * The chosen creator.
 		 *
 		 * @protected
-		 * @member {core.Creator} core.Editor#_creator
+		 * @member {ckeditor5.Creator} ckeditor5.Editor#_creator
 		 */
 	}
 
@@ -164,7 +164,7 @@ export default class Editor {
 	 * Destroys the editor instance, releasing all resources used by it. If the editor replaced an element, the
 	 * element will be recovered.
 	 *
-	 * @fires core.Editor#destroy
+	 * @fires ckeditor5.Editor#destroy
 	 * @returns {Promise} A promise that resolves once the editor instance is fully destroyed.
 	 */
 	destroy() {
@@ -218,6 +218,5 @@ utils.mix( Editor, ObservableMixin );
  * 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.
  *
- * @memberOf core.Editor
- * @event destroy
+ * @event ckeditor5.Editor#destroy
  */

+ 2 - 2
src/editorconfig.js

@@ -11,10 +11,10 @@ import Config from './utils/config.js';
 /**
  * Handles a configuration dictionary for an editor instance.
  *
- * The basic difference between {@link core.EditorConfig} and {@link utils.Config} is that {@link core.EditorConfig#get} retrieves
+ * The basic difference between {@link ckeditor5.EditorConfig} and {@link utils.Config} is that {@link ckeditor5.EditorConfig#get} retrieves
  * configurations from {@link CKEDITOR#config} if they are not found.
  *
- * @memberOf core
+ * @memberOf ckeditor5
  * @extends utils.Config
  */
 export default class EditorConfig extends Config {

+ 2 - 2
src/feature.js

@@ -12,11 +12,11 @@ import Plugin from './plugin.js';
  * utilities, services and components.
  *
  * The main responsibilities for Feature are:
- * * setting required dependencies (see {@link core.Plugin#requires},
+ * * setting required dependencies (see {@link ckeditor5.Plugin#requires},
  * * configuring, instantiating and registering commands to editor,
  * * registering converters to editor (if the feature operates on Tree Model),
  * * setting and registering UI components (if the feature uses it).
  *
- * @memberOf core
+ * @memberOf ckeditor5
  */
 export default class Feature extends Plugin {}

+ 4 - 4
src/plugin.js

@@ -11,19 +11,19 @@ import utils from './utils/utils.js';
 /**
  * The base class for CKEditor plugin classes.
  *
- * @memberOf core
+ * @memberOf ckeditor5
  * @mixes utils.ObservaleMixin
  */
 export default class Plugin {
 	/**
 	 * Creates a new Plugin instance.
 	 *
-	 * @param {core.Editor} editor
+	 * @param {ckeditor5.Editor} editor
 	 */
 	constructor( editor ) {
 		/**
 		 * @readonly
-		 * @member {core.Editor} core.Plugin#editor
+		 * @member {ckeditor5.Editor} ckeditor5.Plugin#editor
 		 */
 		this.editor = editor;
 	}
@@ -42,7 +42,7 @@ export default class Plugin {
 	 *		}
 	 *
 	 * @static
-	 * @member {Function[]} core.Plugin.requires
+	 * @member {Function[]} ckeditor5.Plugin.requires
 	 */
 
 	/**

+ 8 - 8
src/plugincollection.js

@@ -13,24 +13,24 @@ import load from './load.js';
 /**
  * Manages a list of CKEditor plugins, including loading, resolving dependencies and initialization.
  *
- * @memberOf core
+ * @memberOf ckeditor5
  */
 export default class PluginCollection {
 	/**
 	 * Creates an instance of the PluginCollection class, initializing it with a set of plugins.
 	 *
-	 * @param {core.Editor} editor
+	 * @param {ckeditor5.Editor} editor
 	 */
 	constructor( editor ) {
 		/**
 		 * @protected
-		 * @member {core.Editor} core.PluginCollection#_editor
+		 * @member {ckeditor5.Editor} ckeditor5.PluginCollection#_editor
 		 */
 		this._editor = editor;
 
 		/**
 		 * @protected
-		 * @member {Map} core.PluginCollection#_plugins
+		 * @member {Map} ckeditor5.PluginCollection#_plugins
 		 */
 		this._plugins = new Map();
 	}
@@ -47,7 +47,7 @@ export default class PluginCollection {
 	 * Gets the plugin instance by its name or class.
 	 *
 	 * @param {String/Function} key The name of the plugin or the class.
-	 * @returns {core.Plugin}
+	 * @returns {ckeditor5.Plugin}
 	 */
 	get( key ) {
 		return this._plugins.get( key );
@@ -59,7 +59,7 @@ export default class PluginCollection {
 	 * @param {String[]} plugins An array of plugins to load.
 	 * @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 {ckeditor5.Plugin[]} returns.loadedPlugins The array of loaded plugins.
 	 */
 	load( plugins ) {
 		const that = this;
@@ -147,7 +147,7 @@ export default class PluginCollection {
 	 * For instance:
 	 *
 	 * * `foo` will be transformed to `ckeditor5/foo/foo.js`,
-	 * * `core/editor` to `ckeditor5/core/editor.js` and
+	 * * `ui/controller` to `ckeditor5/ui/controller.js` and
 	 * * `foo/bar/bom` to `ckeditor5/foo/bar/bom.js`.
 	 *
 	 * @param {String} name
@@ -167,7 +167,7 @@ export default class PluginCollection {
 	 *
 	 * @protected
 	 * @param {String/Function} key The name or the plugin class.
-	 * @param {core.Plugin} plugin The instance of the plugin.
+	 * @param {ckeditor5.Plugin} plugin The instance of the plugin.
 	 */
 	_add( key, plugin ) {
 		this._plugins.set( key, plugin );

+ 1 - 1
tests/creator/manual/_utils/imitatefeatures.js

@@ -12,7 +12,7 @@ import ButtonView from '/ckeditor5/ui/button/buttonview.js';
 /**
  * Immitates that some features were loaded and did their job.
  *
- * @param {core.Editor} editor
+ * @param {ckeditor5.Editor} editor
  */
 export function imitateFeatures( editor ) {
 	const t = editor.t;