Keyboard

The keys the editor answers to, the same as in Gmail and Notion.

The editor answers to the keys people already know from Gmail and Notion. Each block of this document says which key to try on it.

Shift+Enter breaks this line without a new paragraph.
Select these words and press ⌘K, or paste a URL over them.
  • Enter on an empty item leaves the list
  • Backspace at the start of an item outdents it
Arrow down onto the divider, Backspace, then ⌘Z.


Type ## , > , 1. or --- at the start of an empty line.

On Windows and Linux, read Ctrl for ⌘.

Text

KeyWhat it does
EnterStarts a new block.
Shift+EnterBreaks the line inside the block. The break is a \n in the text, and the readers render it as <br>.
⌘B, ⌘I, ⌘U, ⌘EBold, italic, underline, inline code.
⌘Z, ⌘⇧ZUndo, redo.
/Opens the slash menu.
KeyWhat it does
⌘K on selected textOpens the link form in the floating toolbar, to link that text.
⌘K with the caret in a linkWith a ContentEditor.Inspector on screen, focuses its URL field: change the address, then Enter or Escape hands the caret back to the text. Without an inspector, opens the link form to change or remove the address.
⌘V with a URLPasted over selected text, the URL links that text. Pasted at the caret, it arrives as a link.

A link is edited in one place at a time. The form creates one; an existing link belongs to the inspector when the host mounted one, and the toolbar's link control follows the same rule as the key.

⌘K is not specific to links. A toolbar item binds a key with hotkey, in the notation isHotkey reads ("mod+k"), and the canvas then does what pressing the item does: it runs the item, or opens its form.

const linkItem: ContentToolbarItem = {
	key: "link",
	group: "text",
	icon: LinkIcon,
	label: "link",
	kbd: ["⌘", "K"],
	hotkey: "mod+k",
	run: () => {},
	Popover: ContentLinkPopover,
	editedInInspector: (editor) => linkAtSelection(editor) !== null,
};

editedInInspector is how an item hands an element to the inspector: while it returns true and an inspector is on screen, the key and the control focus the inspector's first field instead of opening Popover.

Leave hotkey out when the item's own Plate plugin already binds the key, as the marks' plugins do for ⌘B, ⌘I and ⌘U. kbd stays what the tooltip shows.

Lists

KeyWhat it does
Enter on an empty itemLeaves the list.
Backspace at the start of an itemOutdents it. On a first-level item, turns it back into a paragraph.
Tab, Shift+TabIndents, outdents.

Void elements

An image, a divider or an embed holds no text, so it shows no caret. The arrow keys still stop on it: the element rings itself while it is selected.

KeyWhat it does
Arrow keysSelect the element, then move past it. At the start or the end of the document, where there is no block to move to, they create an empty paragraph.
EnterStarts a paragraph below the element.
Backspace, DeleteDelete the selected element. ⌘Z brings it back.

The ring comes from VoidFrame, the box every void element of the kit draws itself in. The arrow and Enter handling is the void-navigation feature, which createContentFeatures() includes.

Markdown shortcuts

Typed at the start of an empty block:

TypeYou get
- , * A bulleted list.
1. , 1) A numbered list.
> A quote.
## , ### A heading, one # per level. # stays text: the page owns the h1.
---A divider.

Around text: **bold**, *italic*, __underline__, ~~strikethrough~~ and `code`.