ckeditor5-elements / ElementOrPositionButtonView
Class: ElementOrPositionButtonView
A button that reflects an ElementOrPositionCommand and executes it when clicked.
The label, icon and tooltip are the command title, icon and tooltip. For a toggleable command, the button is toggleable, so assistive technology is told whether it is "on". Without a target, the button is enabled when the command is. With a target (e.g. in a context menu of an element), it is enabled and "on" according to the command state for that target, kept up to date as the document changes.
A failed (rejected) command is reported with a warning of the Notification plugin.
Extends
Extended by
Constructors
Constructor
ts
new ElementOrPositionButtonView(
locale,
command,
options?
): ElementOrPositionButtonView;Parameters
| Parameter | Type |
|---|---|
locale | Locale | undefined |
command | ElementOrPositionCommand |
options? | ElementOrPositionButtonViewOptions |
Returns
ElementOrPositionButtonView
Overrides
ButtonView.constructor
Properties
command
ts
readonly command: ElementOrPositionCommand;The command this button reflects.
target
ts
readonly target:
| ElementOrPositionTarget
| undefined;The position or element the button acts on, if any.