瀏覽代碼

API docs fixes.

Maciek 9 年之前
父節點
當前提交
9778ccf471

+ 5 - 2
packages/ckeditor5-autoformat/src/autoformat.js

@@ -3,6 +3,10 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module autoformat/autoformat
+ */
+
 import BlockAutoformatEngine from './blockautoformatengine.js';
 import InlineAutoformatEngine from './inlineautoformatengine.js';
 import Plugin from '../core/plugin.js';
@@ -43,8 +47,7 @@ import ItalicEngine from '../basic-styles/italicengine.js';
  * * `**foo bar**` or `__foo bar__` – will bold the text,
  * * `*foo bar*` or `_foo bar_` – will italicize the text,
  *
- * @memberOf autoformat
- * @extends core.Plugin
+ * @extends module:core/plugin~Plugin
  */
 export default class Autoformat extends Plugin {
 	/**

+ 8 - 5
packages/ckeditor5-autoformat/src/blockautoformatengine.js

@@ -3,6 +3,10 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module autoformat/blockautoformatengine
+ */
+
 import Range from '../engine/model/range.js';
 import TextProxy from '../engine/model/textproxy.js';
 
@@ -14,9 +18,8 @@ import TextProxy from '../engine/model/textproxy.js';
  * so the autoformatting step can be undone, if the user's intention wasn't to format the text.
  *
  * See the constructors documentation to learn how to create custom inline autoformatters. You can also use
- * the {@link autoformat.Autoformat} feature which enables a set of default autoformatters (lists, headings, bold and italic).
- *
- * @memberOf autoformat
+ * the {@link module:autoformat/autoformat~Autoformat} feature which enables a set of default autoformatters
+ * (lists, headings, bold and italic).
  */
 export default class BlockAutoformatEngine {
 	/**
@@ -42,11 +45,11 @@ export default class BlockAutoformatEngine {
 	 *			} );
 	 * 		} );
 	 *
-	 * @param {core.editor.Editor} editor Editor instance.
+	 * @param {module:core/editor~Editor} editor Editor instance.
 	 * @param {RegExp} pattern Regular expression to exec on just inserted text.
 	 * @param {Function|String} callbackOrCommand Callback to execute or command to run when text is matched.
 	 * In case of providing callback it receives following parameters:
-	 * * {engine.model.Batch} batch Newly created batch for autoformat changes.
+	 * * {module:engine/model/batch~Batch} batch Newly created batch for autoformat changes.
 	 * * {Object} match RegExp.exec() result of matching pattern to inserted text.
 	 */
 	constructor( editor, pattern, callbackOrCommand ) {

+ 9 - 6
packages/ckeditor5-autoformat/src/inlineautoformatengine.js

@@ -3,6 +3,10 @@
  * For licensing, see LICENSE.md.
  */
 
+/**
+ * @module autoformat/inlineautoformatengine
+ */
+
 import LiveRange from '../engine/model/liverange.js';
 import getSchemaValidRanges from '../core/command/helpers/getschemavalidranges.js';
 
@@ -14,19 +18,18 @@ import getSchemaValidRanges from '../core/command/helpers/getschemavalidranges.j
  * so the autoformatting step can be undone, if the user's intention wasn't to format the text.
  *
  * See the constructors documentation to learn how to create custom inline autoformatters. You can also use
- * the {@link autoformat.Autoformat} feature which enables a set of default autoformatters (lists, headings, bold and italic).
- *
- * @memberOf autoformat
+ * the {@link module:autoformat/autoformat~Autoformat} feature which enables a set of default autoformatters
+ * (lists, headings, bold and italic).
  */
 export default class InlineAutoformatEngine {
 	/**
-	 * Enables autoformatting mechanism on a given {@link core.editor.Editor}.
+	 * Enables autoformatting mechanism on a given {@link module:core/editor~Editor}.
 	 *
 	 * It formats the matched text by applying given model attribute or by running the provided formatting callback.
 	 * Each time data model changes text from given node (from the beginning of the current node to the collapsed
 	 * selection location) will be tested.
 	 *
-	 * @param {core.editor.Editor} editor Editor instance.
+	 * @param {module:core/editor~Editor} editor Editor instance.
 	 * @param {Function|RegExp} testRegexpOrCallback RegExp or callback to execute on text.
 	 * Provided RegExp *must* have three capture groups. First and third capture groups
 	 * should match opening/closing delimiters. Second capture group should match text to format.
@@ -202,7 +205,7 @@ export default class InlineAutoformatEngine {
 // Returns whole text from parent element by adding all data from text nodes together.
 //
 // @private
-// @param {engine.model.Element} element
+// @param {module:engine/model/element~Element} element
 // @returns {String}
 function getText( element ) {
 	return Array.from( element.getChildren() ).reduce( ( a, b ) => a + b.data, '' );

+ 1 - 1
packages/ckeditor5-autoformat/tests/blockautoformatengine.js

@@ -102,7 +102,7 @@ class TestCommand extends Command {
 	/**
 	 * Creates an instance of the command.
 	 *
-	 * @param {core.editor.Editor} editor Editor instance.
+	 * @param {module:core/editor~Editor} editor Editor instance.
 	 * @param {Function} onExecuteCallback _doExecute call hook
 	 */
 	constructor( editor, onExecuteCallback ) {