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

Function addToElements

packages/editor/src/plugin/editable.ts:532–539  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

530 : domEl.closest(`[${DATA_EDITABLE_NODE}]`)
531
532 const addToElements = (node: Node) => {
533 if (!NODE_TO_ELEMENT.get(node)) return
534 const children = Editable.findLowestDOMElements(editor, node)
535 for (const child of children) {
536 if (~elements.indexOf(child)) continue
537 elements.push(child)
538 }
539 }
540
541 if (!element) {
542 const nodes = Node.nodes(editor)

Callers 1

findClosestPointFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…