Rich text / foldkit-richtext-dom

positionToRange

function · packages/richtext-dom/src/index.ts:474

function positionToRange(
  dom: EditorDom,
  position: RichText.Position,
): Range | undefined

The DOM range for a semantic position, or undefined if it no longer resolves. An offset where two decorated pieces meet lands at the end of the first.