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

Function yTextToInsertDelta

packages/yjs-transform/src/delta.ts:35–37  ·  view source on GitHub ↗
(yText: Y.XmlText)

Source from the content-addressed store, hash-verified

33}
34
35export function yTextToInsertDelta(yText: Y.XmlText): InsertDelta {
36 return normalizeInsertDelta(yText.toDelta()) as InsertDelta
37}
38
39export function getInsertLength({ insert }: DeltaInsert): number {
40 return typeof insert === 'string' ? insert.length : 1

Callers 9

yTextToEditorElementFunction · 0.90
cloneDeepFunction · 0.90
getYTargetFunction · 0.90
getEditorPathFunction · 0.90
mergeNodeFunction · 0.90
moveNodeFunction · 0.90
splitNodeFunction · 0.90

Calls 1

normalizeInsertDeltaFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…