fn
orderedSelection
testedEndpoints 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
| Parameter | Type | Description |
|---|---|---|
sel | TextSelection | — |
doc | EditorDocument | — |
Returns
{ from: Position; to: Position; }