Browse Source

Add private methods docs.

Maciej Gołaszewski 6 years ago
parent
commit
112fcdf383
1 changed files with 9 additions and 0 deletions
  1. 9 0
      packages/ckeditor5-font/src/utils.js

+ 9 - 0
packages/ckeditor5-font/src/utils.js

@@ -66,6 +66,7 @@ export function buildDefinition( modelAttributeKey, options ) {
  * **Note**: `styleAttr` should be either `'color'` or `'background-color'`.
  *
  * @param {String} styleAttr
+ * @return {String}
  */
 export function renderUpcastAttribute( styleAttr ) {
 	return viewElement => normalizeColorCode( viewElement.getStyle( styleAttr ) );
@@ -165,10 +166,18 @@ export function getLocalizedColorOptions( editor, options ) {
 	} );
 }
 
+// Fixes color value string
+//
+// @param {String} value
+// @returns {String}
 function normalizeColorCode( value ) {
 	return value.replace( /\s/g, '' );
 }
 
+// Creates normalized color definition from user defined configuration.
+//
+// @param {String|Object}
+// @returns {module:ui/colorgrid/colorgrid~ColorDefinition}
 function normalizeSingleColorDefinition( color ) {
 	if ( typeof color === 'string' ) {
 		return {