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

Docs: Table API docs improvements, part 4. [skip ci]

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

+ 1 - 1
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.js

@@ -13,7 +13,7 @@ import TableCellPropertyCommand from './tablecellpropertycommand';
  * The table cell background color command.
  *
  * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
- * `'tableCellBackgroundColor'` editor command.
+ * the `'tableCellBackgroundColor'` editor command.
  *
  * To change the background color of selected cells, execute the command:
  *

+ 2 - 2
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellbordercolorcommand.js

@@ -14,7 +14,7 @@ import { getSingleValue } from '../../commands/utils';
  * The table cell border color command.
  *
  * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
- * `'tableCellBorderColor'` editor command.
+ * the `'tableCellBorderColor'` editor command.
  *
  * To change the border color of selected cells, execute the command:
  *
@@ -26,7 +26,7 @@ import { getSingleValue } from '../../commands/utils';
  */
 export default class TableCellBorderColorCommand extends TableCellPropertyCommand {
 	/**
-	 * Creates a new `TableCellBorderWidthCommand` instance.
+	 * Creates a new `TableCellBorderColorCommand` instance.
 	 *
 	 * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
 	 */

+ 2 - 2
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellborderstylecommand.js

@@ -14,7 +14,7 @@ import { getSingleValue } from '../../commands/utils';
  * The table cell border style command.
  *
  * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
- * `'tableCellBorderStyle'` editor command.
+ * the `'tableCellBorderStyle'` editor command.
  *
  * To change the border style of selected cells, execute the command:
  *
@@ -26,7 +26,7 @@ import { getSingleValue } from '../../commands/utils';
  */
 export default class TableCellBorderStyleCommand extends TableCellPropertyCommand {
 	/**
-	 * Creates a new `TableCellBorderWidthCommand` instance.
+	 * Creates a new `TableCellBorderStyleCommand` instance.
 	 *
 	 * @param {module:core/editor/editor~Editor} editor An editor in which this command will be used.
 	 */

+ 1 - 1
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellborderwidthcommand.js

@@ -14,7 +14,7 @@ import TableCellPropertyCommand from './tablecellpropertycommand';
  * The table cell border width command.
  *
  * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
- * `'tableCellBorderWidth'` editor command.
+ * the `'tableCellBorderWidth'` editor command.
  *
  * To change the border width of selected cells, execute the command:
  *

+ 1 - 1
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellheightcommand.js

@@ -14,7 +14,7 @@ import TableCellPropertyCommand from './tablecellpropertycommand';
  * The table cell height command.
  *
  * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
- * `'tableCellHeight'` editor command.
+ * the `'tableCellHeight'` editor command.
  *
  * To change the height of selected cells, execute the command:
  *

+ 1 - 1
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js

@@ -13,7 +13,7 @@ import TableCellPropertyCommand from './tablecellpropertycommand';
  * The table cell horizontal alignment command.
  *
  * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
- * `'tableCellHorizontalAlignment'` editor command.
+ * the `'tableCellHorizontalAlignment'` editor command.
  *
  * To change the horizontal text alignment of selected cells, execute the command:
  *

+ 1 - 1
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellpaddingcommand.js

@@ -14,7 +14,7 @@ import TableCellPropertyCommand from './tablecellpropertycommand';
  * The table cell padding command.
  *
  * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
- * `'tableCellPadding'` editor command.
+ * the `'tableCellPadding'` editor command.
  *
  * To change the padding of selected cells, execute the command:
  *

+ 3 - 3
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.js

@@ -50,9 +50,9 @@ export default class TableCellPropertyCommand extends Command {
 	 * @fires execute
 	 * @param {Object} [options]
 	 * @param {*} [options.value] If set, the command will set the attribute on selected table cells.
-	 * If it is not set, the command will remove the attribute from selected table cells.
+	 * If it is not set, the command will remove the attribute from the selected table cells.
 	 * @param {module:engine/model/batch~Batch} [options.batch] Pass the model batch instance to the command to aggregate changes,
-	 * e.g. allow a single undo step for multiple executions.
+	 * for example to allow a single undo step for multiple executions.
 	 */
 	execute( options = {} ) {
 		const model = this.editor.model;
@@ -89,7 +89,7 @@ export default class TableCellPropertyCommand extends Command {
 	}
 
 	/**
-	 * Returns the proper model value. Can be used to add a default unit to numeric values.
+	 * Returns the proper model value. It can be used to add a default unit to numeric values.
 	 *
 	 * @private
 	 * @param {*} value

+ 4 - 4
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellverticalalignmentcommand.js

@@ -13,7 +13,7 @@ import TableCellPropertyCommand from './tablecellpropertycommand';
  * The table cell vertical alignment command.
  *
  * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
- * `'tableCellVerticalAlignment'` editor command.
+ * the `'tableCellVerticalAlignment'` editor command.
  *
  * To change the vertical text alignment of selected cells, execute the command:
  *
@@ -21,13 +21,13 @@ import TableCellPropertyCommand from './tablecellpropertycommand';
  *			value: 'top'
  *		} );
  *
- * The following values are allowed corresponding to
- * [the `vertical-align` CSS attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align):
+ * The following values, corresponding to the
+ * [`vertical-align` CSS attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align), are allowed:
  *
  * * `'top'`
  * * `'bottom'`
  *
- * The `'middle'` value is default one so there's no need to set this value.
+ * The `'middle'` value is the default one so there is no need to set it.
  *
  * @extends module:table/tablecellproperties/commands/tablecellpropertycommand
  */

+ 3 - 3
packages/ckeditor5-table/src/tablecellproperties/commands/tablecellwidthcommand.js

@@ -14,7 +14,7 @@ import TableCellPropertyCommand from './tablecellpropertycommand';
  * The table cell width command.
  *
  * The command is registered by the {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing} as
- * `'tableCellWidth'` editor command.
+ * the `'tableCellWidth'` editor command.
  *
  * To change the width of selected cells, execute the command:
  *
@@ -22,13 +22,13 @@ import TableCellPropertyCommand from './tablecellpropertycommand';
  *			value: '50px'
  *		} );
  *
- * **Note**: This command adds a default `'px'` unit to a numeric values. Executing:
+ * **Note**: This command adds a default `'px'` unit to numeric values. Executing:
  *
  *		editor.execute( 'tableCellWidth', {
  *			value: '50'
  *		} );
  *
- * Will set `width` attribute to `'50px'` in the model.
+ * will set the `width` attribute to `'50px'` in the model.
  *
  * @extends module:table/tablecellproperties/commands/tablecellpropertycommand
  */

+ 8 - 8
packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesediting.js

@@ -29,21 +29,21 @@ const VALIGN_VALUES_REG_EXP = /^(top|bottom)$/;
 /**
  * The table cell properties editing feature.
  *
- * Introduces table cells's model attributes and their conversion:
+ * Introduces table cell model attributes and their conversion:
  *
  * - border: `borderStyle`, `borderColor` and `borderWidth`
  * - background color: `backgroundColor`
  * - cell padding: `padding`
  * - horizontal and vertical alignment: `horizontalAlignment`, `verticalAlignment`
- * - cell width & height: `width` & `height`
+ * - cell width and height: `width`, `height`
  *
  * It also registers commands used to manipulate the above attributes:
  *
- * - border: `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` commands
- * - background color: `'tableCellBackgroundColor'`
- * - cell padding: `'tableCellPadding'`
- * - horizontal and vertical alignment: `'tableCellHorizontalAlignment'`, `'tableCellVerticalAlignment'`
- * - width & height: `'tableCellWidth'` & `'tableCellHeight'`
+ * - border: the `'tableCellBorderStyle'`, `'tableCellBorderColor'` and `'tableCellBorderWidth'` commands
+ * - background color: the `'tableCellBackgroundColor'` command
+ * - cell padding: the `'tableCellPadding'` command
+ * - horizontal and vertical alignment: the `'tableCellHorizontalAlignment'` and `'tableCellVerticalAlignment'` commands
+ * - width and height: the `'tableCellWidth'` and `'tableCellHeight'` commands
  *
  * @extends module:core/plugin~Plugin
  */
@@ -99,7 +99,7 @@ export default class TableCellPropertiesEditing extends Plugin {
 	}
 }
 
-// Enables `'borderStyle'`, `'borderColor'` and `'borderWidth'` attributes for table cells.
+// Enables the `'borderStyle'`, `'borderColor'` and `'borderWidth'` attributes for table cells.
 //
 // @param {module:engine/model/schema~Schema} schema
 // @param {module:engine/conversion/conversion~Conversion} conversion

+ 7 - 7
packages/ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.js

@@ -34,7 +34,7 @@ const ERROR_TEXT_TIMEOUT = 500;
 
 /**
  * The table cell properties UI plugin. It introduces the `'tableCellProperties'` button
- * that opens a form allowing to specify visual styling of a table cell.
+ * that opens a form allowing to specify the visual styling of a table cell.
  *
  * It uses the
  * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.
@@ -272,7 +272,7 @@ export default class TableCellPropertiesUI extends Plugin {
 	/**
 	 * Shows the {@link #view} in the {@link #_balloon}.
 	 *
-	 * **Note**: Each time a view is shown, the new {@link #_undoStepBatch} is created that contains
+	 * **Note**: Each time a view is shown, a new {@link #_undoStepBatch} is created. It contains
 	 * all changes made to the document when the view is visible, allowing a single undo step
 	 * for all of them.
 	 *
@@ -322,7 +322,7 @@ export default class TableCellPropertiesUI extends Plugin {
 	}
 
 	/**
-	 * Returns `true` when the {@link #view} is the visible in the {@link #_balloon}.
+	 * Returns `true` when the {@link #view} is visible in the {@link #_balloon}.
 	 *
 	 * @private
 	 * @type {Boolean}
@@ -342,7 +342,7 @@ export default class TableCellPropertiesUI extends Plugin {
 	}
 
 	/**
-	 * Creates a callback that when executed upon {@link #view view's} property change
+	 * Creates a callback that when executed upon the {@link #view view's} property change
 	 * executes a related editor command with the new property value.
 	 *
 	 * @private
@@ -359,9 +359,9 @@ export default class TableCellPropertiesUI extends Plugin {
 	}
 
 	/**
-	 * Creates a callback that when executed upon {@link #view view's} property change:
-	 * * executes a related editor command with the new property value if the value is valid,
-	 * * or sets the error text next to the invalid field, if the value did not pass the validation.
+	 * Creates a callback that when executed upon the {@link #view view's} property change:
+	 * * Executes a related editor command with the new property value if the value is valid,
+	 * * Or sets the error text next to the invalid field, if the value did not pass the validation.
 	 *
 	 * @private
 	 * @param {Object} options