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

Docs: Improved font package docs.

Aleksander Nowodzinski 7 лет назад
Родитель
Сommit
5c46e309e3

+ 3 - 2
packages/ckeditor5-font/src/fontcommand.js

@@ -25,7 +25,7 @@ export default class FontCommand extends Command {
 		super( editor );
 
 		/**
-		 * If is set it means that selection has `attributeKey` set to that value.
+		 * When set, it reflects the {@link #attributeKey} value of the selection.
 		 *
 		 * @observable
 		 * @readonly
@@ -53,7 +53,8 @@ export default class FontCommand extends Command {
 	}
 
 	/**
-	 * Executes the command. Applies the the attribute `value` to a selection. If no value is passed it removes attribute from selection.
+	 * Executes the command. Applies the `value` of the {@link #attributeKey} to the selection.
+	 * If no `value` is passed, it removes the attribute from the selection.
 	 *
 	 * @protected
 	 * @param {Object} [options] Options for the executed command.

+ 1 - 1
packages/ckeditor5-font/src/fontfamily.js

@@ -91,7 +91,7 @@ export default class FontFamily extends Plugin {
  *			]
  *		};
  *
- * which configures 8 font family options. Each option consist one or more coma–separated font-family names. The first font name is
+ * which configures 8 font family options. Each option consist one or more comma–separated font-family names. The first font name is
  * used as a dropdown item description in the UI. The family names that consist of spaces should not have quotes
  * (as opposed to the CSS standard).
  *

+ 2 - 2
packages/ckeditor5-font/src/fontfamily/utils.js

@@ -8,8 +8,8 @@
  */
 
 /**
- * Returns {@link module:font/fontfamily~FontFamilyConfig#options} array with options normalized in the
- * {@link module:font/fontfamily~FontFamilyOption} format.
+ * Normalizes the {@link module:font/fontfamily~FontFamilyConfig#options config options}
+ * to the {@link module:font/fontfamily~FontFamilyOption} format.
  *
  * @param {Array.<String|Object>} configuredOptions An array of options taken from configuration.
  * @returns {Array.<module:font/fontfamily~FontFamilyOption>}

+ 9 - 10
packages/ckeditor5-font/src/fontsize.js

@@ -73,8 +73,8 @@ export default class FontSize extends Plugin {
  */
 
 /**
- * Available font size options. Defined either using predefined presets, numeric pixel values
- * or {@link module:font/fontsize~FontSizeOption}.
+ * Available font size options. Expressed as predefined presets, numerical "pixel" values
+ * or the {@link module:font/fontsize~FontSizeOption}.
  *
  * The default value is:
  *
@@ -88,23 +88,22 @@ export default class FontSize extends Plugin {
  *			]
  *		};
  *
- * It defines 4 sizes: "tiny", "small", "big" and "huge". Those values will be rendered as `span` elements in view. The "normal" defines
- * text without a `fontSize` attribute set.
+ * It defines 4 sizes: **tiny**, **small**, **big**, and **huge**. These values will be rendered as `span` elements in view.
+ * The **normal** defines a text without the `fontSize` attribute.
  *
- * Each rendered span in the view will have class attribute set corresponding to size name.
- * For instance for "small" size the view will render:
+ * Each `span` has the `class` attribute set to the corresponding size name. For instance, this is what the **small** size looks
+ * like in the view:
  *
  * 		<span class="text-small">...</span>
  *
- * As an alternative the font size might be defined using numeric values (either as Number or as String):
+ * As an alternative, the font size might be defined using the numerical values (either as a `Number` or as a `String`):
  *
  * 		const fontSizeConfig = {
  * 			options: [ 9, 10, 11, 12, 13, 14, 15 ]
  * 		};
  *
- * To use defined font sizes from {@link module:core/commandcollection~CommandCollection} use `fontSize` command and pass desired
- * font size as a value.
- * For example, the below code will apply `fontSize` attribute with `tiny` value to the current selection:
+ * Font size can be applied using the command API. To do that, use the `fontSize` command and pass the desired font size as a `value`.
+ * For example, the below code will apply the `fontSize` attribute with the **tiny** value to the current selection:
  *
  *		editor.execute( 'fontSize', { value: 'tiny' } );
  *

+ 2 - 2
packages/ckeditor5-font/src/fontsize/utils.js

@@ -8,8 +8,8 @@
  */
 
 /**
- * Returns {@link module:font/fontsize~FontSizeConfig#options} array with options normalized in the
- * {@link module:font/fontsize~FontSizeOption} format, translated.
+ * Normalizes and translates the {@link module:font/fontsize~FontSizeConfig#options config options}
+ * to the {@link module:font/fontsize~FontSizeOption} format.
  *
  * @param {Array.<String|Number|Object>} configuredOptions An array of options taken from configuration.
  * @returns {Array.<module:font/fontsize~FontSizeOption>}