Vizel API / core/src / VizelBubbleMenuAction
Interface: VizelBubbleMenuAction
Defined in: packages/core/src/toolbar/actions.ts:280
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:288
Group identifier for visual separation (dividers between groups).
icon
icon: VizelIconName;Defined in: packages/core/src/toolbar/actions.ts:286
Icon name from the Vizel icon system.
id
id: string;Defined in: packages/core/src/toolbar/actions.ts:282
Unique action identifier (stable across locale changes).
isActive
isActive: (editor) => boolean;Defined in: packages/core/src/toolbar/actions.ts:290
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:284
Localized label (used for title / aria-label).
requiresExtension?
optional requiresExtension?: string;Defined in: packages/core/src/toolbar/actions.ts:300
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:292
Executes the toggle command.
Parameters
| Parameter | Type |
|---|---|
editor | Editor |
Returns
void
shortcut
shortcut: string;Defined in: packages/core/src/toolbar/actions.ts:294
Keyboard shortcut label for the tooltip (e.g. "Mod+B").