Răsfoiți Sursa

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

Anna Tomanek 6 ani în urmă
părinte
comite
f7adb2ea74

+ 3 - 3
packages/ckeditor5-table/src/ui/colorinputview.js

@@ -47,7 +47,7 @@ export default class ColorInputView extends View {
 		this.set( 'value', '' );
 		this.set( 'value', '' );
 
 
 		/**
 		/**
-		 * The `id` attribute of the input (i.e. to pair with a `<label>` element).
+		 * The `id` attribute of the input (i.e. to pair with the `<label>` element).
 		 *
 		 *
 		 * @observable
 		 * @observable
 		 * @member {String} #id
 		 * @member {String} #id
@@ -74,7 +74,7 @@ export default class ColorInputView extends View {
 		this.set( 'hasError', false );
 		this.set( 'hasError', false );
 
 
 		/**
 		/**
-		 * The `id` of the element describing this field, e.g. when it has
+		 * The `id` of the element describing this field. When the field has
 		 * some error, it helps screen readers read the error text.
 		 * some error, it helps screen readers read the error text.
 		 *
 		 *
 		 * @observable
 		 * @observable
@@ -83,7 +83,7 @@ export default class ColorInputView extends View {
 		this.set( 'ariaDescribedById' );
 		this.set( 'ariaDescribedById' );
 
 
 		/**
 		/**
-		 * Cached reference to the options passed to the constructor.
+		 * A cached reference to the options passed to the constructor.
 		 *
 		 *
 		 * @member {Object}
 		 * @member {Object}
 		 */
 		 */

+ 1 - 1
packages/ckeditor5-table/src/ui/formheaderview.js

@@ -51,7 +51,7 @@ export default class FormHeaderView extends View {
 		this.set( 'class', options.class || null );
 		this.set( 'class', options.class || null );
 
 
 		/**
 		/**
-		 * Label of the header.
+		 * The label of the header.
 		 *
 		 *
 		 * @readonly
 		 * @readonly
 		 * @member {String} #label
 		 * @member {String} #label

+ 2 - 2
packages/ckeditor5-table/src/ui/formrowview.js

@@ -12,7 +12,7 @@ import View from '@ckeditor/ckeditor5-ui/src/view';
 import '../../theme/formrow.css';
 import '../../theme/formrow.css';
 
 
 /**
 /**
- * The class representing a single row in the complex form,
+ * The class representing a single row in a complex form,
  * used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}.
  * used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}.
  *
  *
  * **Note**: For now this class is private. When more use cases arrive (beyond ckeditor5-table),
  * **Note**: For now this class is private. When more use cases arrive (beyond ckeditor5-table),
@@ -30,7 +30,7 @@ export default class FormRowView extends View {
 	 * @param {Array.<module:ui/view~View>} options.children
 	 * @param {Array.<module:ui/view~View>} options.children
 	 * @param {String} [options.class]
 	 * @param {String} [options.class]
 	 * @param {module:ui/view~View} [options.labelView] When passed, the row gets the `group` and `aria-labelledby`
 	 * @param {module:ui/view~View} [options.labelView] When passed, the row gets the `group` and `aria-labelledby`
-	 * DOM attributes and get described by the label.
+	 * DOM attributes and gets described by the label.
 	 */
 	 */
 	constructor( locale, options = {} ) {
 	constructor( locale, options = {} ) {
 		super( locale );
 		super( locale );

+ 13 - 13
packages/ckeditor5-table/src/ui/utils.js

@@ -34,7 +34,7 @@ const isEmpty = val => val === '';
  * with respect to the table in the editor content, if one is selected.
  * with respect to the table in the editor content, if one is selected.
  *
  *
  * @param {module:core/editor/editor~Editor} editor The editor instance.
  * @param {module:core/editor/editor~Editor} editor The editor instance.
- * @param {String} target Either "cell" or "table". Determines the the target the balloon will
+ * @param {String} target Either "cell" or "table". Determines the target the balloon will
  * be attached to.
  * be attached to.
  */
  */
 export function repositionContextualBalloon( editor, target ) {
 export function repositionContextualBalloon( editor, target ) {
@@ -154,7 +154,7 @@ export function colorFieldValidator( value ) {
 }
 }
 
 
 /**
 /**
- * Returns `true` when the passed value is an empty string, number without unit or a valid CSS length expression.
+ * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.
  * Otherwise, `false` is returned.
  * Otherwise, `false` is returned.
  *
  *
  * See {@link module:engine/view/styles/utils~isLength}.
  * See {@link module:engine/view/styles/utils~isLength}.
@@ -170,7 +170,7 @@ export function lengthFieldValidator( value ) {
 }
 }
 
 
 /**
 /**
- * Returns `true` when the passed value is an empty string, number without unit or a valid CSS length expression.
+ * Returns `true` when the passed value is an empty string, a number without a unit or a valid CSS length expression.
  * Otherwise, `false` is returned.
  * Otherwise, `false` is returned.
  *
  *
  * See {@link module:engine/view/styles/utils~isLength}.
  * See {@link module:engine/view/styles/utils~isLength}.
@@ -220,7 +220,7 @@ export function getBorderStyleDefinitions( view ) {
 }
 }
 
 
 /**
 /**
- * A helper that fills a toolbar toolbar with buttons that:
+ * A helper that fills a toolbar with buttons that:
  *
  *
  * * have some labels,
  * * have some labels,
  * * have some icons,
  * * have some icons,
@@ -233,7 +233,7 @@ export function getBorderStyleDefinitions( view ) {
  * @param {module:ui/toolbar/toolbarview~ToolbarView} options.toolbar
  * @param {module:ui/toolbar/toolbarview~ToolbarView} options.toolbar
  * @param {Object.<String,String>} labels
  * @param {Object.<String,String>} labels
  * @param {String} propertyName
  * @param {String} propertyName
- * @param {Function} nameToValue Function that maps button name to value. By default names are the same as values.
+ * @param {Function} nameToValue A function that maps a button name to a value. By default names are the same as values.
  */
  */
 export function fillToolbar( { view, icons, toolbar, labels, propertyName, nameToValue } ) {
 export function fillToolbar( { view, icons, toolbar, labels, propertyName, nameToValue } ) {
 	for ( const name in labels ) {
 	for ( const name in labels ) {
@@ -393,18 +393,18 @@ export const defaultColors = [
 ];
 ];
 
 
 /**
 /**
- * Returns a creator for color input with a label.
+ * Returns a creator for a color input with a label.
  *
  *
- * For given options, it returns a function that creates an instance of
+ * For given options, it returns a function that creates an instance of a
  * {@link module:table/ui/colorinputview~ColorInputView color input} logically related to
  * {@link module:table/ui/colorinputview~ColorInputView color input} logically related to
- * a {@link module:ui/labeledview/labeledview~LabeledView labeled view} in DOM.
+ * a {@link module:ui/labeledview/labeledview~LabeledView labeled view} in the DOM.
  *
  *
  * The helper does the following:
  * The helper does the following:
  *
  *
- * * It sets color input's `id` and `ariaDescribedById` attributes.
- * * It binds color input's `isReadOnly` to the labeled view.
- * * It binds color input's `hasError` to the labeled view.
- * * It enables a logic that cleans up the error when user starts typing in the color input.
+ * * It sets the color input `id` and `ariaDescribedById` attributes.
+ * * It binds the color input `isReadOnly` to the labeled view.
+ * * It binds the color input `hasError` to the labeled view.
+ * * It enables a logic that cleans up the error when the user starts typing in the color input.
  *
  *
  * Usage:
  * Usage:
  *
  *
@@ -414,7 +414,7 @@ export const defaultColors = [
  *		} );
  *		} );
  *
  *
  *		const labeledInputView = new LabeledView( locale, colorInputCreator );
  *		const labeledInputView = new LabeledView( locale, colorInputCreator );
- *		console.log( labeledInputView.view ); // An color input instance.
+ *		console.log( labeledInputView.view ); // A color input instance.
  *
  *
  * @private
  * @private
  * @param options Color input options.
  * @param options Color input options.