Skip to content

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

ts
group: string;

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

Group identifier for visual separation (dividers between groups).


icon

ts
icon: VizelIconName;

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

Icon name from the Vizel icon system.


id

ts
id: string;

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

Unique action identifier (stable across locale changes).


isActive

ts
isActive: (editor) => boolean;

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

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:284

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


requiresExtension?

ts
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

ts
run: (editor) => void;

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

Executes the toggle command.

Parameters

ParameterType
editorEditor

Returns

void


shortcut

ts
shortcut: string;

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

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

Released under the MIT License.