ui/colorgrid/utils
@ckeditor/ckeditor5-ui/src/colorgrid/utils
Filtering
Interfaces
-
NormalizedColorOption
module:ui/colorgrid/utils~NormalizedColorOption
Type Definitions
-
ColorOption
module:ui/colorgrid/utils~ColorOption
Functions
-
getLocalizedColorOptions( locale, options ) → Array<NormalizedColorOption>
module:ui/colorgrid/utils~getLocalizedColorOptions
Returns color configuration options as defined in
editor.config.(fontColor|fontBackgroundColor).colors
or `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
t
when the user configuration is defined because the editor does not exist yet.Parameters
locale : Locale
The
locale
instance.options : Array<NormalizedColorOption>
Returns
Array<NormalizedColorOption>
-
normalizeColorOptions( options ) → Array<NormalizedColorOption>
module:ui/colorgrid/utils~normalizeColorOptions
Creates 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>
-
normalizeSingleColorDefinition( color ) → NormalizedColorOption
module:ui/colorgrid/utils~normalizeSingleColorDefinition
Creates a normalized color definition from the user-defined configuration. The "normalization" means it will create full
ColorDefinition-like
object for string values, and add aview
property, for each definition.Parameters
color : ColorOption
Returns
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.