ui/colorgrid/utils
Interfaces
-
module:ui/colorgrid/utils~NormalizedColorOption
Type Definitions
-
module:ui/colorgrid/utils~ColorOption
Functions
-
getLocalizedColorOptions( locale, options ) → Array<NormalizedColorOption>module:ui/colorgrid/utils~getLocalizedColorOptionsReturns color configuration options as defined in
editor.config.(fontColor|fontBackgroundColor).colorsor `editor.config.table.(tableProperties|tableCellProperties).(background|border).colors but processed to account for editor localization in the correct language.Note: The reason behind this method is that there is no way to use
twhen the user configuration is defined because the editor does not exist yet.Parameters
locale : LocaleThe
localeinstance.options : Array<NormalizedColorOption>
Returns
Array<NormalizedColorOption>
-
normalizeColorOptions( options ) → Array<NormalizedColorOption>module:ui/colorgrid/utils~normalizeColorOptionsCreates a unified color definition object from color configuration options. The object contains the information necessary to both render the UI and initialize the conversion.
Parameters
options : Array<ColorOption>
Returns
Array<NormalizedColorOption>
-
module:ui/colorgrid/utils~normalizeSingleColorDefinitionCreates a normalized color definition from the user-defined configuration. The "normalization" means it will create full
ColorDefinition-likeobject for string values, and add aviewproperty, for each definition.Parameters
color : ColorOption
Returns