Skip to content

Vizel API / core/src / VizelToolbarAction

Interface: VizelToolbarAction

Defined in: packages/core/src/toolbar/actions.ts:9

A single toolbar action definition.

Properties

group

ts
group: string;

Defined in: packages/core/src/toolbar/actions.ts:17

Group identifier for visual separation


icon

ts
icon: VizelIconName;

Defined in: packages/core/src/toolbar/actions.ts:15

Icon name from the Vizel icon system


id

ts
id: string;

Defined in: packages/core/src/toolbar/actions.ts:11

Unique action identifier


isActive

ts
isActive: (editor) => boolean;

Defined in: packages/core/src/toolbar/actions.ts:19

Check if this action is currently active

Parameters

ParameterType
editorEditor

Returns

boolean


isEnabled

ts
isEnabled: (editor) => boolean;

Defined in: packages/core/src/toolbar/actions.ts:21

Check if this action can be executed

Parameters

ParameterType
editorEditor

Returns

boolean


label

ts
label: string;

Defined in: packages/core/src/toolbar/actions.ts:13

Display label


run

ts
run: (editor) => void;

Defined in: packages/core/src/toolbar/actions.ts:23

Execute the action

Parameters

ParameterType
editorEditor

Returns

void


shortcut?

ts
optional shortcut?: string;

Defined in: packages/core/src/toolbar/actions.ts:25

Optional keyboard shortcut label for tooltip

Released under the MIT License.