ButtonLink Class
The ButtonLink class provides functionality for creating and editing a link in a document. ButtonLink renders in two different modes:
- Normal: Just a button that allows to switch to the edition mode
- Exclusive: The ButtonLinkEdit UI with all the link edition controls.
Methods
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:
A string with the state CSS classes.
isActive
()
Boolean
Checks if the current selection is contained within a link.
Returns:
True if the selection is inside a link, false otherwise.
render
()
Object
Lifecycle. Renders the UI of the button.
Returns:
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: link
label
String
The label that should be used for accessibility purposes.
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.