(sharedRoot: Y.XmlText, editorRoot: Node, op: RemoveNodeOperation)
| 3 | import { getYTarget } from '@editablejs/yjs-transform' |
| 4 | |
| 5 | export function removeNode(sharedRoot: Y.XmlText, editorRoot: Node, op: RemoveNodeOperation): void { |
| 6 | const { yParent: parent, textRange } = getYTarget(sharedRoot, editorRoot, op.path) |
| 7 | parent.delete(textRange.start, textRange.end - textRange.start) |
| 8 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…