Skip to content

ckeditor5-elements / ElementActions

Class: ElementActions ​

Registers commands that act on an element: moveElementUp, moveElementDown, duplicateElement and deleteElement.

ts
editor.execute('duplicateElement'); // The element at the selection.
editor.commands.get('moveElementUp').executeFor(element); // The given element.

The commands have titles and icons, so they can be menu items (e.g. in the elementContextMenu config of ElementContextMenu) and buttons.

Extends ​

Constructors ​

Constructor ​

ts
new ElementActions(editor): ElementActions;

Parameters ​

ParameterType
editorEditor

Returns ​

ElementActions

Inherit Doc ​

Inherited from ​

Plugin.constructor

Accessors ​

pluginName ​

Get Signature ​

ts
get static pluginName(): "ElementActions";
Returns ​

"ElementActions"

Methods ​

init() ​

ts
init(): void;

Returns ​

void