R
fn

orderedSelection

tested

Endpoints of a text selection in document order (`from` before `to`). Within one block they are ordered by offset; across blocks by block index.

Signature

ts
export function orderedSelection(sel: TextSelection, doc: EditorDocument):{ ... }

Parameters

ParameterTypeDescription
selTextSelection
docEditorDocument

Returns

{ from: Position; to: Position; }