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

Method wrapWith

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

* use schema to update this node

(schema: Schema)

Source from the content-addressed store, hash-verified

614 * use schema to update this node
615 */
616 wrapWith(schema: Schema) {
617 const wrappedNode = this.replaceWith({ ...schema, children: [this.export()] })
618 return wrappedNode?.children!.get(0)
619 }
620
621 /**
622 * replace this node with a new node

Callers

nothing calls this directly

Calls 3

replaceWithMethod · 0.95
exportMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected