Skip to content
Edytor
Esc
↑↓navigate↵open⌘Jpreview
On this page

Arrow move

The arrow move plugin moves the caret's block with Mod+Shift and the arrow keys, as in Notion, and the selected blocks with Mod and the arrow keys.

arrowMovePlugin moves blocks with the keyboard. Mod + Shift + ↑/↓ moves the block holding the caret one step, as in Notion; Mod + ↑/↓ moves the selected blocks. Mod is Cmd on macOS and Ctrl elsewhere.

<Edytor> includes it by default, after your plugins. List arrowMovePlugin yourself to put it elsewhere in the order, or pass defaultPlugins={false} to leave it out (see Default plugins). It takes no options.

Behavior

Keys Moves When
Mod + Shift + ↑/↓ The selected blocks, or else the block where the selection starts A caret, text or block selection
Mod + ↑/↓ The selected blocks A block selection

One step is:

Direction Move
Up Before the previous sibling; from a first child, before the parent
Down After the next sibling (never into its children); from a last child, after the parent

A key is claimed only when a block can take the step. Otherwise it keeps its default meaning: Mod + ↑/↓ move the caret to the start or end of the document, and with Shift extend the selection there.

  • Moving the caret’s block keeps the caret in it, at the same offset.
  • A group of selected siblings moves together, in document order. Selected blocks that are not siblings do not move.
  • Moved selected blocks stay selected, so you can press the key again.
  • A move never nests a block. To nest or outdent, use Tab and Shift + Tab, or a block handle’s Alt + → and Alt + ← (see Block handles).
  • Each move is one undo step, and it runs as a moveBlock or moveBlocks operation that plugins can refuse.

The plugin calls edytor.moveBlocks({ blocks, direction }), the same command block menus use. See Commands.

Was this page helpful?