Show:

CKEditor plugin that bridges the support offered by CKEditor MenuButton plugin. It takes over the responsibility of registering and creating menuButtons via:

  • editor.ui.addMenuButton(name, definition)
  • editor.ui.add(name, CKEDITOR.UI_MENUBUTTON, definition)

Constructor

CKEDITOR.plugins.ae_menubuttonbridge

()

Methods

generateMenuButtonBridge

(
  • menuButtonName
  • menuButtonDefinition
)
Object private

Generates a MenuButtonBridge React class for a given menuButton definition if it has not been already created based on the button name and definition.

Parameters:

  • menuButtonName String

    The menuButton's name

  • menuButtonDefinition Object

    The menuButton's definition

Returns:

Object:

The generated or already existing React MenuButton Class

init

(
  • editor
)

Set the add handler for UI_MENUBUTTON to our own. We do this in the init phase to override the one in the native plugin in case it's present.

Parameters:

  • editor Object

    The CKEditor instance being initialized