Selecting and moving
Words are selected along the lines and on across blocks; whole blocks are selected with Shift-Up or Shift-Down and moved by hand or from the keys.
Words across blocks
Press in the first paragraph and drag down into the list: the selection runs over every block between. Then press ⌘B.
What it stores
Words across blocks
Section titled “Words across blocks”Each block is its own editable element, and a browser keeps a selection dragged in one inside it. Aa carries it on: once a mouse press that is selecting words reaches another block, the selection runs from where the press began to the pointer, over every block between. It is one selection, and typing, Backspace and Delete, the marks (⌘B, ⌘I, ⌘U, ⌘E, ⌘⇧S), copy and cut act on all of it.
- A press that first moves along a line selects words. One that first moves up or down lifts its block instead: see Moving blocks by hand.
- A double or triple press and a drag go on from the start of the word or the line it selected.
- Shift and a click in another block extend the selection to it.
- Near the window’s top or bottom edge the page scrolls on, and the selection with it.
- ⌘A selects the words of the block the caret is in (a table cell’s first), and pressed again, all the writing.
- Copy puts the selected Markdown on the clipboard, syntax and all.
On touch the selection is the system’s own, by a long press. See On a phone.
Blocks selected
Section titled “Blocks selected”Blocks selected
Press Shift-Down to select blocks, then ⌘D, ⌘⇧↑ or Backspace. Escape clears the selection and leaves editing.
What it stores
Shift-↑ and Shift-↓ select whole blocks: from the caret’s block to the one above or below, and further with each press. Escape leaves editing: it clears the selection and blinking caret without changing the words.
| Key | With blocks selected |
|---|---|
| ↑, ↓ | Select the block above or below instead. |
| Shift-↑, Shift-↓ | Take in one more block, or one fewer. |
| ←, Enter | Back to writing, at the start of the block. |
| → | Back to writing, at the end of the block. |
| Backspace, Delete | Delete the blocks. |
| ⌘D | Duplicate them: the copies stand after them, selected. |
| ⌘⇧↑, ⌘⇧↓ | Move them up or down; they stay selected. |
| ⌘⌥0 to ⌘⌥8 | Turn them into another kind. |
| ⌘C, ⌘X | Copy them as Markdown; cut takes them away. |
| Typing | Writes in their place. |
A click in the writing puts the caret back and lets the blocks go. Escape also closes Aa’s formatting controls and an open comment, and clears an AI answer’s temporary marks. During IME composition, Escape stays with the input method.
Moving blocks by hand
Section titled “Moving blocks by hand”Moving blocks by hand
Rest the pointer on a block until it turns into a hand, then drag it up or down. A press held still for a moment lifts it too.
What it stores
There is no handle. A block is moved with the mouse, on the Drag library’s sortable engine: it lifts, the blocks it passes step aside by its whole height, and it lands where the press is let go.
| Press | What it does |
|---|---|
| Held still for a moment | Lifts the block. |
| Moving up or down first | Lifts the block at once. |
| Moving along the line first | Selects words, as it always has. |
| On a picture, moving any way | Lifts it at once: a picture has no words to select. |
| On a block the pointer rested on | The cursor has turned into a hand: the press lifts the block whichever way it moves. |
| On selected blocks | Drags them at once. The one pressed is carried, the others wait dimmed in their places, and they land together. |
| A second or third press | Selects a word or a line; it never lifts. |
Let go where it began, a lifted block stays and the caret goes where the press was. A block carried to another block’s side, its first or last fifth and four squares at most, shows a line down that side; let go there, the two stand side by side as columns. Moved blocks stay selected, so ⌘⇧↑, Backspace or another drag act on them next.
Touch keeps its long press for selecting words: there the block menu’s Move up and Move down move blocks. Files dropped from outside land between blocks, on a line drawn where they will go.
Duplicating and deleting
Section titled “Duplicating and deleting”⌘D duplicates the block the caret is in, or the blocks selected, and selects the copies. Backspace or Delete deletes selected blocks, and the block menu, ⌘/, holds Duplicate, Delete, Move up and Move down for the block the caret is in. Each is one step to undo. A document with every block deleted keeps one empty paragraph.
From code
Section titled “From code”editor.selectBlocks(2, 4) // blocks 2 to 4, selected as blockseditor.selectRange(120, 168) // words, as offsets into the Markdowneditor.blockAction('duplicate') // 'delete', 'duplicate', 'up' or 'down', on the selected blocks or the caret'seditor.moveBlock(5, 1, 2) // two blocks from 5 to 1; they stay selectededitor.selection() // { start, end } in the Markdown, or nullSee Methods and events.
| Option | Default | What it does |
|---|---|---|
menus | true | false also turns off moving blocks by hand. |
readOnly | false | Nothing is moved, duplicated or deleted. |