MCPcopy Create free account
hub / github.com/editablejs/editable / editorRangeToRelativeRange

Function editorRangeToRelativeRange

packages/yjs-transform/src/position.ts:234–243  ·  view source on GitHub ↗
(
  sharedRoot: Y.XmlText,
  editorRoot: Node,
  range: BaseRange,
)

Source from the content-addressed store, hash-verified

232}
233
234export function editorRangeToRelativeRange(
235 sharedRoot: Y.XmlText,
236 editorRoot: Node,
237 range: BaseRange,
238): RelativeRange {
239 return {
240 anchor: editorPointToRelativePosition(sharedRoot, editorRoot, range.anchor),
241 focus: editorPointToRelativePosition(sharedRoot, editorRoot, range.focus),
242 }
243}
244
245export function relativeRangeToEditorRange(
246 sharedRoot: Y.XmlText,

Callers 4

withYCursorsFunction · 0.90
withYHistoryFunction · 0.90
handleStackItemAddedFunction · 0.90
handleStackItemUpdatedFunction · 0.90

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…