ButtonStyle Class
ButtonStyle is a mixin that provides a style prop and some methods to apply the resulting style and checking if it is present in a given path or selection.
Methods
componentWillMount
()
Lifecycle. Invoked once, both on the client and server, immediately before the initial rendering occurs.
componentWillUnmount
()
Lifecycle. Invoked immediately before a component is unmounted from the DOM.
getStyle
()
CKEDITOR.style
Returns instance of CKEDITOR.style which represents the current button style.
Returns:
The current style representation.
isActive
()
Boolean
Checks if style is active in the current selection.
Returns:
True if style is active, false otherwise.
Properties
style
Object | String
The style the button should handle. Allowed values are:
- Object as described by http://docs.ckeditor.com/#!/api/CKEDITOR.style.
- String pointing to an object inside the editor instance configuration. For example,
style = 'coreStyles_bold'
will try to retrieve the style object fromeditor.config.coreStyles_bold
. Nested properties such asstyle = 'myplugin.myConfig.myStyle'
are also supported and will try to retrieve the style object from the editor configuration as well.
styleFn
Function
The style function the button should handle. If specified, style function has higher priority than style property.