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

Function position

packages/plugins/yjs/src/plugin/with-yjs.ts:124–131  ·  view source on GitHub ↗
(editor: YjsEditor, key: string)

Source from the content-addressed store, hash-verified

122 },
123
124 position(editor: YjsEditor, key: string): Point | null | undefined {
125 const position = getStoredPosition(editor.sharedRoot, key)
126 if (!position) {
127 return undefined
128 }
129
130 return relativePositionToEditorPoint(editor.sharedRoot, editor, position)
131 },
132
133 storedPositionsRelative(editor: YjsEditor): Record<string, Y.RelativePosition> {
134 return getStoredPositions(editor.sharedRoot)

Callers

nothing calls this directly

Calls 2

getStoredPositionFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…