Show:

The ButtonH1 class provides wraps a selection in h1 element.

Methods

applyStyle

()

Removes or applies the component style to the current selection.

centerToolbar

(
  • toolbar
  • rect
)

Centers a Toolbar according to given rectangle

Parameters:

  • toolbar Object

    The toolbar to be centered

  • rect Object

    The rectangle according to which the Toolbar will be centered

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.

getDefaultProps

() Object

Lifecycle. Returns the default values of the properties used in the widget.

Returns:

Object:

The default properties.

getStateClasses

() String

Returns the list of state classes associated to the current element's state, according to the results of the isActive and isDisabled methods.

Returns:

String:

A string with the state CSS classes.

getStyle

() CKEDITOR.style

Returns instance of CKEDITOR.style which represents the current button style.

Returns:

CKEDITOR.style:

The current style representation.

imageSelectionSetPosition

(
  • payload
)
Boolean

Sets the position of a toolbar according to the position of the selected image

Parameters:

  • payload Object

    Payload, should contain the selection data for retrieving the client rectangle of the selected image

Returns:

Boolean:

True, in all cases

isActive

() Boolean

Checks if style is active in the current selection.

Returns:

Boolean:

True if style is active, false otherwise.

render

() Object

Lifecycle. Renders the UI of the button.

Returns:

Object:

The content which should be rendered.

tableSelectionSetPosition

(
  • payload
)
Boolean

Sets the position of a toolbar according to the position of the selected image

Parameters:

  • payload Object

    Object, which contains the selection data for retrieving the client rectangle of the selected table

Returns:

Boolean:

True, in all cases

Properties

editor

Object

The editor instance where the component is being used.

key

String static

The name which will be used as an alias of the button in the configuration.

Default: h1

label

String

The label that should be used for accessibility purposes.

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 from editor.config.coreStyles_bold. Nested properties such as style = 'myplugin.myConfig.myStyle' are also supported and will try to retrieve the style object from the editor configuration as well.

tabIndex

Number

The tabIndex of the button in its toolbar current state. A value other than -1 means that the button has focus and is the active element.