MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / insertAfter

Method insertAfter

packages/core/src/document/node/node.ts:534–537  ·  view source on GitHub ↗

* insert a node after a reference node(in current node's children)

(node: Node, ref?: Node, useMutator = true)

Source from the content-addressed store, hash-verified

532 * insert a node after a reference node(in current node's children)
533 */
534 insertAfter(node: Node, ref?: Node, useMutator = true) {
535 const nodeInstance = ensureNode(node, this.document)
536 this.children?.internalInsert(nodeInstance, ref ? (ref.index || 0) + 1 : null, useMutator)
537 }
538
539 @action
540 remove(purge = true, useMutator = true) {

Callers 3

insertMethod · 0.95
migrateNodeMethod · 0.80
executeOperationFunction · 0.80

Calls 2

ensureNodeFunction · 0.85
internalInsertMethod · 0.80

Tested by

no test coverage detected