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

Function getStoredPosition

packages/yjs-transform/src/position.ts:70–77  ·  view source on GitHub ↗
(sharedRoot: Y.XmlText, key: string)

Source from the content-addressed store, hash-verified

68}
69
70export function getStoredPosition(sharedRoot: Y.XmlText, key: string): Y.RelativePosition | null {
71 const rawPosition = sharedRoot.getAttribute(STORED_POSITION_PREFIX + key)
72 if (!rawPosition) {
73 return null
74 }
75
76 return Y.decodeRelativePosition(rawPosition)
77}
78
79export function getStoredPositions(sharedRoot: Y.XmlText): Record<string, Y.RelativePosition> {
80 return Object.fromEntries(

Callers 1

positionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…