Type Editor / @type-editor/commands / util/move-selection-block / moveSelectionBlock
Function: moveSelectionBlock()
ts
function moveSelectionBlock(state, dir): Selection_2;Defined in: util/move-selection-block.ts:13
Moves the selection to the next or previous block-level position.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | PmEditorState | The current editor state |
dir | number | Direction to move: -1 for backward, 1 for forward |
Returns
Selection_2
A new selection at the block boundary, or null if not possible