Extensions
Short Cuts
Keyboard shortcuts for every formatting action
Wires up the standard keyboard shortcuts: ⌘B bold, ⌘I italic, ⌘U
underline, ⌘⇧S strikethrough, ⌘E code, ⌘K link, plus block-level
shortcuts.
Install
pnpm add @typix-editor/extension-short-cutsLive demo
Shortcuts
import { SHORTCUTS } from "@typix-editor/extension-short-cuts";The SHORTCUTS constant is the full default mapping. Use it as a base
for custom shortcuts via configExtension.
Config
| Option | Type | Default | Description |
|---|---|---|---|
shortcuts | Partial<Record<ShortcutName, string>> | built-in | Override key combos per shortcut name. |
enableDefaults | boolean | true | Disable to opt-out of built-in shortcuts. |
Custom shortcut
import { configExtension } from "@typix-editor/core";
configExtension(ShortCutsExtension, {
shortcuts: {
bold: "mod+shift+b", // override ⌘B
},
});