Type Editor / @type-editor/dom-change-util / parse-change/resolve-selection
parse-change/resolve-selection
Functions
| Function | Description |
|---|---|
Resolves a selection from parsed anchor/head positions. This function converts numeric positions from the parsed document into a proper ProseMirror Selection object. It performs validation and uses the selectionBetween helper to create the appropriate selection type (TextSelection, NodeSelection, etc.). The function returns null if the positions are invalid (outside document bounds). This can happen if the selection was in a part of the document that wasn't parsed or if parsing failed to find the positions. See selectionBetween for selection creation logic |