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

Function deltaInsertToEditorNode

packages/yjs-transform/src/index.ts:16–22  ·  view source on GitHub ↗
(insert: DeltaInsert)

Source from the content-addressed store, hash-verified

14}
15
16export function deltaInsertToEditorNode<T extends Node>(insert: DeltaInsert): T {
17 if (typeof insert.insert === 'string') {
18 return { ...insert.attributes, text: insert.insert } as T
19 }
20
21 return yTextToEditorElement(insert.insert) as T
22}
23
24export function editorNodesToInsertDelta<T extends Node>(nodes: T[]): InsertDelta {
25 return nodes.map(node => {

Callers 1

applyDeltaFunction · 0.90

Calls 1

yTextToEditorElementFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…