Skip to content

Vizel API / core/src / VizelBubbleMenuAction

Interface: VizelBubbleMenuAction ​

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

A single bubble-menu action definition.

Similar to VizelToolbarAction but specialised for the inline bubble menu surface: bound to a Tiptap mark name, with a tooltip shortcut and an optional extension-name precondition (so actions tied to extensions a consumer hasn't enabled don't show up).

Properties ​

group ​

ts
group: string;

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

Group identifier for visual separation (dividers between groups).


icon ​

ts
icon: VizelIconName;

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

Icon name from the Vizel icon system.


id ​

ts
id: string;

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

Unique action identifier (stable across locale changes).


isActive ​

ts
isActive: (editor) => boolean;

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

Returns true when the action is currently applied to the selection.

Parameters ​

ParameterType
editorEditor

Returns ​

boolean


label ​

ts
label: string;

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

Localized label (used for title / aria-label).


requiresExtension? ​

ts
optional requiresExtension?: string;

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

If set, the action is only emitted when an extension with this name is registered on the editor. Lets superscript / subscript opt out cleanly when the consumer didn't enable those features.


run ​

ts
run: (editor) => void;

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

Executes the toggle command.

Parameters ​

ParameterType
editorEditor

Returns ​

void


shortcut ​

ts
shortcut: string;

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

Keyboard shortcut label for the tooltip (e.g. "Mod+B").

Released under the MIT License.