Skip to main content
For how to apply these, see Appearance and labels and Toolbars, shortcuts and search.

Tokens

Set these CSS custom properties on the editor root or an ancestor. Inkkit reads no other custom property; properties that begin --_inkkit- are internal. Defaults that use light-dark() follow --inkkit-color-scheme.

Labels

Pass any of these keys in labels at mount to replace the default text. Labels are fixed at mount.

Shortcuts

Pass bindings in keymap at mount, or replace them later with setKeymap. Each call replaces the whole map: a name you leave out loses its binding, except that a name with default keys keeps them. [] removes a name’s defaults. Formatting has no default bindings, and link has no name because it needs a destination. A Keymap maps each name to an array of keys. An unknown name, or a value that isn’t an array of strings, throws invalid-argument; a null entry counts as omitted.
  • Where bindings apply. History bindings work on every surface. Formatting, block move and table bindings work only in formatted mode. Mod-z, Mod-y and Shift-Mod-z are always consumed, even when unbound, so the browser’s own undo never changes source or TXT text.
  • A key shared by two names goes to the later group, in the order history, formatting, block moves, tables. A table binding passes its key on to a block move bound to the same key when its command isn’t available, so tableMoveRowUp and moveBlockUp can share a key: rows move in a table, blocks move elsewhere.
  • A bound key is consumed even when its history, formatting or block move command isn’t available now. A table binding passes the key on when its command isn’t available. A block move binding passes the key on in a table, in a read-only editor and where there is no block to move, so the web view’s own caret movement applies; on a Mac, Option-Up and Option-Down move to the start or end of a paragraph.
  • A command that fails from a shortcut the person presses reports its error through events.error. Through keyDown, a bound key in a read-only editor throws read-only, except a block move key, which returns false.

Key notation

Keys use ProseMirror key notation: modifiers joined to a KeyboardEvent.key value with -, such as Mod-b, Shift-Mod-z or Alt-ArrowDown. Mod is Command on Apple platforms and Control elsewhere, and Alt is Option on a Mac.