Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Docs: Improved documentation of the Plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed May 18, 2017
1 parent 96e4d4c commit e62d0ab
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/autoformat.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
* * `**foo bar**` or `__foo bar__` – will bold the text,
* * `*foo bar*` or `_foo bar_` – will italicize the text,
*
* NOTE: Remember to add proper features to editor configuration. Autoformatting will be enabled only for those
* commands that are included in current configuration. For example: `bold` autoformatting will not work if there is no
* `bold` command registered in editor.
* NOTE: Remember to add proper features to the editor configuration. Autoformatting will be enabled only for those
* commands that are included in the actual configuration. For example: `bold` autoformatting will not work if there is no
* `bold` command registered in the editor.
*
* @extends module:core/plugin~Plugin
*/
Expand All @@ -67,11 +67,11 @@ export default class Autoformat extends Plugin {
}

/**
* Adds autoformatting related to `bulletedList` and `numberedList` commands.
* Adds autoformatting related to the {@link module:list/list~List}.
*
* When typed:
* - `* ` or `- ` - paragraph will be changed to a bulleted list,
* - `1. ` or `1) ` - paragraph will be changed to a numbered list (1 can be any digit or list of digits).
* - `* ` or `- ` - a paragraph will be changed to a bulleted list,
* - `1. ` or `1) ` - a paragraph will be changed to a numbered list ("1" can be any digit or list of digits).
*
* @private
*/
Expand All @@ -90,7 +90,8 @@ export default class Autoformat extends Plugin {
}

/**
*Adds autoformatting related to `bold` and `italic` commands.
* Adds autoformatting related to the {@link module:basic-styles/bold~Bold} and
* {@link module:basic-styles/italic~Italic}.
*
* When typed:
* - `**foobar**`: `**` characters are removed, and `foobar` is set to bold,
Expand Down Expand Up @@ -122,8 +123,9 @@ export default class Autoformat extends Plugin {
}

/**
* Adds autoformatting related to heading commands.
* It is using number at the end of the command name to associate it with proper trigger:
* Adds autoformatting related to {@link module:heading/heading~Heading}.
*
* It is using a number at the end of the command name to associate it with the proper trigger:
* * `heading1` will be executed when typing `#`,
* * `heading2` will be executed when typing `##`,
* * `heading3` will be executed when typing `###`.
Expand Down

0 comments on commit e62d0ab

Please sign in to comment.