Vizel API / core/src / createVizelCommandShortcutsExtension
Function: createVizelCommandShortcutsExtension()
ts
function createVizelCommandShortcutsExtension(options): Extension;Defined in: packages/core/src/extensions/command-shortcuts.ts:27
Create a Tiptap extension that binds the keyboard shortcuts declared by a VizelCommand array.
For every command with surfaces.shortcut === true and a shortcut field, the extension registers a binding using the platform-specific string: shortcut.mac on macOS, shortcut.other elsewhere. The bound callback runs command.run(editor); the return value follows Tiptap's keybinding contract — true signals the editor consumed the key event.
Parameters
| Parameter | Type |
|---|---|
options | VizelCommandShortcutsOptions |
Returns
Extension