Show:

ButtonActionStyle is a mixin that provides applying style implementation for a button based on the applyStyle and removeStyle API of CKEDITOR.

To execute properly, the component has to expose the following methods which can be obtained out of the box using the ButtonStyle mixin:

  • Function isActive to check the active state
  • Function getStyle to return the style that should be applied

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

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

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