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
group: string;Defined in: packages/core/src/toolbar/actions.ts:289
Group identifier for visual separation (dividers between groups).
icon
icon: VizelIconName;Defined in: packages/core/src/toolbar/actions.ts:287
Icon name from the Vizel icon system.
id
id: string;Defined in: packages/core/src/toolbar/actions.ts:283
Unique action identifier (stable across locale changes).
isActive
isActive: (editor) => boolean;Defined in: packages/core/src/toolbar/actions.ts:291
Returns true when the action is currently applied to the selection.
Parameters
| Parameter | Type |
|---|---|
editor | Editor |
Returns
boolean
label
label: string;Defined in: packages/core/src/toolbar/actions.ts:285
Localized label (used for title / aria-label).
requiresExtension?
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
run: (editor) => void;Defined in: packages/core/src/toolbar/actions.ts:293
Executes the toggle command.
Parameters
| Parameter | Type |
|---|---|
editor | Editor |
Returns
void
shortcut
shortcut: string;Defined in: packages/core/src/toolbar/actions.ts:295
Keyboard shortcut label for the tooltip (e.g. "Mod+B").