Overview
The Style component changes some styles that are not easy to handle by the CSS.
Properties
lines
get
Returns the latest Lines instance.
This is an alias of Code#Lines
.
i18n
get
Returns the i18n collection.
This is an alias of this.options.i18n
.
Methods
add()
add( selector: string, prop: string | Record<string, string | number>, value?: string | number ): void
Adds styles to the specified selector.
The Editor#apply()
or Editor#html()
applies the registered styles once,
and therefore initial styles must be added before them.
Otherwise, you should manually invoke the apply()
method.
Params
selector | A selector string. |
---|---|
prop | A CSS property or an objet literal with properties and values. |
value | Optional. A value for the property. |
apply()
apply(): void
Applies registered styles to the style element.