API Docs for: 1.0.0
Show:

eZ.AlloyEditorButton.ButtonLinkEdit Class

The ButtonLinkEdit class provides functionality for creating and editing a link in a document.

Note: This component overrides the one provided by AlloyEditor by default to give more options and improve the UI.

Methods

_handleKeyDown

(
  • event
)
protected

Monitors key interaction inside the input element to respond to the keys:

  • Enter: Creates/updates the link.
  • Escape: Discards the changes.

Parameters:

_selectContent

() protected

Runs the Universal Discovery Widget so that the user can pick a Content.

_setHref

(
  • event
)
protected

Updates the component state when the link input changes on user interaction.

Parameters:

_setTarget

(
  • e
)
protected

Sets the target of the link

Parameters:

_setTitle

(
  • e
)
protected

Sets the link title

Parameters:

getInitialState

()

Lifecycle. Invoked once before the component is mounted. The return value will be used as the initial value of this.state.

render

() Object

Lifecycle. Renders the UI of the button.

Returns:

Object:

The content which should be rendered.

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: linkEdit