8
0
Просмотр исходного кода

Docs: Special characters API docs corrected. [skip ci]

Anna Tomanek 6 лет назад
Родитель
Сommit
3ae4d8c14f

+ 10 - 9
packages/ckeditor5-special-characters/src/specialcharacters.js

@@ -130,9 +130,9 @@ export default class SpecialCharacters extends Plugin {
 	}
 
 	/**
-	 * Adds a collection of special characters to specified group. A title of a special character must be unique.
+	 * Adds a collection of special characters to the specified group. The title of a special character must be unique.
 	 *
-	 * **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for special
+	 * **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for a special
 	 * characters category.
 	 *
 	 * @param {String} groupName
@@ -141,8 +141,8 @@ export default class SpecialCharacters extends Plugin {
 	addItems( groupName, items ) {
 		if ( groupName === ALL_SPECIAL_CHARACTERS_GROUP ) {
 			/**
-			 * The name "All" for special category group cannot be used because it's a special category which displays all available
-			 * special characters.
+			 * The name "All" for a special category group cannot be used because it is a special category that displays all
+			 * available special characters.
 			 *
 			 * @error special-character-invalid-group-name
 			 */
@@ -160,7 +160,7 @@ export default class SpecialCharacters extends Plugin {
 	}
 
 	/**
-	 * Returns iterator of special characters groups.
+	 * Returns an iterator of special characters groups.
 	 *
 	 * @returns {Iterable.<String>}
 	 */
@@ -183,9 +183,10 @@ export default class SpecialCharacters extends Plugin {
 	}
 
 	/**
-	 * Returns a symbol of the special character for specified name. If the special character couldn't be found, `undefined` is returned.
+	 * Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`
+	 * is returned.
 	 *
-	 * @param {String} title A title of the special character.
+	 * @param {String} title The title of a special character.
 	 * @returns {String|undefined}
 	 */
 	getCharacter( title ) {
@@ -196,7 +197,7 @@ export default class SpecialCharacters extends Plugin {
 	 * Returns a group of special characters. If the group with the specified name does not exist, it will be created.
 	 *
 	 * @private
-	 * @param {String} groupName A name of group to create.
+	 * @param {String} groupName The name of the group to create.
 	 */
 	_getGroup( groupName ) {
 		if ( !this._groups.has( groupName ) ) {
@@ -231,5 +232,5 @@ export default class SpecialCharacters extends Plugin {
  * @typedef {Object} module:special-characters/specialcharacters~SpecialCharacterDefinition
  *
  * @property {String} title A unique name of the character (e.g. "greek small letter epsilon").
- * @property {String} character A human-readable character displayed as label (e.g. "ε").
+ * @property {String} character A human-readable character displayed as the label (e.g. "ε").
  */

+ 1 - 1
packages/ckeditor5-special-characters/src/specialcharactersarrows.js

@@ -10,7 +10,7 @@
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
 /**
- * A plugin provides special characters for the "Arrows" category.
+ * A plugin that provides special characters for the "Arrows" category.
  *
  *		ClassicEditor
  *			.create( {

+ 1 - 1
packages/ckeditor5-special-characters/src/specialcharacterscurrency.js

@@ -10,7 +10,7 @@
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
 /**
- * A plugin provides special characters for the "Currency" category.
+ * A plugin that provides special characters for the "Currency" category.
  *
  *		ClassicEditor
  *			.create( {

+ 1 - 1
packages/ckeditor5-special-characters/src/specialcharactersessentials.js

@@ -16,7 +16,7 @@ import SpecialCharactersLatin from './specialcharacterslatin';
 import SpecialCharactersText from './specialcharacterstext';
 
 /**
- * A plugin combining basic set of characters for the special characters plugin.
+ * A plugin combining a basic set of characters for the special characters plugin.
  *
  *		ClassicEditor
  *			.create( {

+ 1 - 1
packages/ckeditor5-special-characters/src/specialcharacterslatin.js

@@ -10,7 +10,7 @@
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
 /**
- * A plugin provides special characters for the "Latin" category.
+ * A plugin that provides special characters for the "Latin" category.
  *
  *		ClassicEditor
  *			.create( {

+ 1 - 1
packages/ckeditor5-special-characters/src/specialcharactersmathematical.js

@@ -10,7 +10,7 @@
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
 /**
- * A plugin provides special characters for the "Mathematical" category.
+ * A plugin that provides special characters for the "Mathematical" category.
  *
  *		ClassicEditor
  *			.create( {

+ 1 - 1
packages/ckeditor5-special-characters/src/specialcharacterstext.js

@@ -10,7 +10,7 @@
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 
 /**
- * A plugin provides special characters for the "Text" category.
+ * A plugin that provides special characters for the "Text" category.
  *
  *		ClassicEditor
  *			.create( {

+ 9 - 9
packages/ckeditor5-special-characters/src/ui/charactergridview.js

@@ -13,7 +13,7 @@ import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
 import '../../theme/charactergrid.css';
 
 /**
- * A grid of character tiles. Allows browsing special characters and selecting the character to
+ * A grid of character tiles. It allows browsing special characters and selecting the character to
  * be inserted into the content.
  *
  * @extends module:ui/view~View
@@ -28,7 +28,7 @@ export default class CharacterGridView extends View {
 		super( locale );
 
 		/**
-		 * Collection of the child tile views. Each tile represents some particular character.
+		 * A collection of the child tile views. Each tile represents a particular character.
 		 *
 		 * @readonly
 		 * @member {module:ui/viewcollection~ViewCollection}
@@ -62,26 +62,26 @@ export default class CharacterGridView extends View {
 		 *
 		 * @event execute
 		 * @param {Object} data Additional information about the event.
-		 * @param {String} data.name A name of the tile that caused the event (e.g. "greek small letter epsilon").
-		 * @param {String} data.character A human-readable character displayed as label (e.g. "ε").
+		 * @param {String} data.name The name of the tile that caused the event (e.g. "greek small letter epsilon").
+		 * @param {String} data.character A human-readable character displayed as the label (e.g. "ε").
 		 */
 
 		/**
-		 * Fired when a mouse or other pointing device caused the cursor to move onto any {@link #tiles grid tile}
+		 * Fired when a mouse or another pointing device caused the cursor to move onto any {@link #tiles grid tile}
 		 * (similar to the native `mouseover` DOM event).
 		 *
 		 * @event tileHover
 		 * @param {Object} data Additional information about the event.
-		 * @param {String} data.name A name of the tile that caused the event (e.g. "greek small letter epsilon").
-		 * @param {String} data.character A human-readable character displayed as label (e.g. "ε").
+		 * @param {String} data.name The name of the tile that caused the event (e.g. "greek small letter epsilon").
+		 * @param {String} data.character A human-readable character displayed as the label (e.g. "ε").
 		 */
 	}
 
 	/**
 	 * Creates a new tile for the grid.
 	 *
-	 * @param {String} character A human-readable character displayed as label (e.g. "ε").
-	 * @param {String} name A name of the character (e.g. "greek small letter epsilon").
+	 * @param {String} character A human-readable character displayed as the label (e.g. "ε").
+	 * @param {String} name The name of the character (e.g. "greek small letter epsilon").
 	 * @returns {module:ui/button/buttonview~ButtonView}
 	 */
 	createTile( character, name ) {

+ 2 - 2
packages/ckeditor5-special-characters/src/ui/characterinfoview.js

@@ -24,7 +24,7 @@ export default class CharacterInfoView extends View {
 		const bind = this.bindTemplate;
 
 		/**
-		 * The character which info is displayed by the view. For instance,
+		 * The character whose information is displayed by the view. For instance,
 		 * "∑" or "¿".
 		 *
 		 * @observable
@@ -96,7 +96,7 @@ export default class CharacterInfoView extends View {
 //
 //	"$" -> "U+0024"
 //
-// Returns empty string when character is `null`.
+// Returns an empty string when the character is `null`.
 //
 // @param {String} character
 // @returns {String}

+ 5 - 5
packages/ckeditor5-special-characters/src/ui/specialcharactersnavigationview.js

@@ -28,7 +28,7 @@ export default class SpecialCharactersNavigationView extends View {
 	 * class.
 	 *
 	 * @param {module:utils/locale~Locale} locale The localization services instance.
-	 * @param {Iterable.<String>} groupNames Names of the character groups.
+	 * @param {Iterable.<String>} groupNames The names of the character groups.
 	 */
 	constructor( locale, groupNames ) {
 		super( locale );
@@ -36,7 +36,7 @@ export default class SpecialCharactersNavigationView extends View {
 		const t = locale.t;
 
 		/**
-		 * Label of the navigation view describing its purpose.
+		 * The label of the navigation view describing its purpose.
 		 *
 		 * @member {module:ui/label/labelview~LabelView}
 		 */
@@ -67,7 +67,7 @@ export default class SpecialCharactersNavigationView extends View {
 	}
 
 	/**
-	 * Returns a name of the character group currently selected in the {@link #groupDropdownView}.
+	 * Returns the name of the character group currently selected in the {@link #groupDropdownView}.
 	 *
 	 * @returns {String}
 	 */
@@ -79,7 +79,7 @@ export default class SpecialCharactersNavigationView extends View {
 	 * Returns a dropdown that allows selecting character groups.
 	 *
 	 * @private
-	 * @param {Iterable.<String>} groupNames Names of the character groups.
+	 * @param {Iterable.<String>} groupNames The names of the character groups.
 	 * @returns {module:ui/dropdown/dropdownview~DropdownView}
 	 */
 	_createGroupDropdown( groupNames ) {
@@ -115,7 +115,7 @@ export default class SpecialCharactersNavigationView extends View {
 	 *
 	 * @private
 	 * @param {module:ui/dropdown/dropdownview~DropdownView} dropdown
-	 * @param {Iterable.<String>} groupNames Names of the character groups.
+	 * @param {Iterable.<String>} groupNames The names of the character groups.
 	 * @returns {Iterable.<module:ui/dropdown/utils~ListDropdownItemDefinition>}
 	 */
 	_getCharacterGroupListItemDefinitions( dropdown, groupNames ) {