Reference
Keyboard shortcuts
Mod is Command on a Mac and Control everywhere else · you bind it once and it is
right on both.
Marks
Mod-B Bold
Mod-I Italic
Mod-U Underline
Mod-E Inline code
Mod-Shift-X Strikethrough
Mod-Shift-H Highlight
Mod-\ Clear formatting · every mark off, back to a paragraph
Mod-Alt-K A key name, as <kbd> · kbd extension
Blocks
Mod-Alt-1 … 6 Heading, levels one to six
Mod-Alt-0 Back to a paragraph
Mod-Shift-B Blockquote
Mod-Alt-C Code block
Lists
Mod-Shift-8 Bulleted list
Mod-Shift-9 Ordered list
Mod-Shift-7 Task list
Mod-Enter Tick or untick a task
Tab · Shift-Tab Nest and lift a list item · next and previous table cell · indent a paragraph
Enter In a toggle’s summary, into its content
Tab Indent the list item
Shift-Tab Outdent it
Enter Split the item
Enter, on an empty item Leave the list
Suggestions
/ Open the block menu, where one is wired up
↑ ↓ Move through it
Enter or Tab Take the highlighted entry
Escape Close it and keep what was typed
Completion
Tab Take the ghost text, when there is some · ghostText extension
Escape Dismiss it
Editing
Mod-Z Undo
Mod-Shift-Z Redo
Mod-Y Redo, for Windows hands
Shift-Enter Line break inside a block
Only Escape in that last group is bound by the extension. The rest is the host's,
because the suggestion extension detects the trigger and renders nothing — the menu, and therefore
what its arrow keys mean, is yours. The one on this site is about a hundred lines; there is a
working copy in Recipes.
Input rules
Typed rather than pressed. Each one is a single undo step, so a wrong guess costs one Mod-Z.
# Heading one. Two hashes for a level two, and so on to six.
- Bulleted list. A plus or an asterisk works too.
1. Ordered list, starting at that number.
[] Task list. Use [x] for one already done.
" Curls, and knows which way · typography extension.
don't The apostrophe closes rather than opens.
-- An em dash.
... An ellipsis.
-> An arrow. Also <-, (c), (tm), +/-.
{{name}} A template field · field extension.
#word A hashtag node · hashtag extension.
$x^2$ An inline formula. $$…$$ on a line of its own for display · math extensions.
sig Whatever the application declared · snippets extension.
:tada: An emoji · emoji extension.
https://… A link · autolink extension.
Binding your own
const spoiler: MarkDef<{ toggleSpoiler: Command }> = {
kind: 'mark',
name: 'spoiler',
commands: { toggleSpoiler: (ctx) => ctx.toggleMark('spoiler') },
keys: { 'Mod-Shift-S': 'toggleSpoiler' },
} A key can name a command or be a function. Later extensions win a conflict, so ordering the array is how you override a built-in binding.