Skip to content

Vizel API / core/src / VizelCommandSurfaceSet

Interface: VizelCommandSurfaceSet ​

Defined in: packages/core/src/commands/types.ts:34

Set of surfaces a VizelCommand participates in.

Every surface entry is optional; absence means the command does not appear on that surface. Each entry carries surface-specific tuning such as priority (lower number = earlier position) and, for the bubble menu, a showWhen predicate that hides the action when the current selection does not warrant it.

Properties ​

blockMenu? ​

ts
readonly optional blockMenu?: object;

Defined in: packages/core/src/commands/types.ts:46

Show the command in the block-level kebab menu.

priority? ​

ts
readonly optional priority?: number;

bubbleMenu? ​

ts
readonly optional bubbleMenu?: object;

Defined in: packages/core/src/commands/types.ts:40

Show the command in the bubble menu when text is selected.

priority? ​

ts
readonly optional priority?: number;

showWhen? ​

ts
readonly optional showWhen?: (editor) => boolean;

Hide the action when the predicate returns false.

Parameters ​
ParameterType
editorEditor
Returns ​

boolean


shortcut? ​

ts
readonly optional shortcut?: true;

Defined in: packages/core/src/commands/types.ts:48

Register the command's shortcut as a Tiptap keybinding.


slashMenu? ​

ts
readonly optional slashMenu?: object;

Defined in: packages/core/src/commands/types.ts:36

Show the command in the slash menu.

priority? ​

ts
readonly optional priority?: number;

toolbar? ​

ts
readonly optional toolbar?: object;

Defined in: packages/core/src/commands/types.ts:38

Show the command in the editor toolbar.

priority? ​

ts
readonly optional priority?: number;

Released under the MIT License.