* replace this node with a new node
(schema: Schema, migrate = false)
| 622 | * replace this node with a new node |
| 623 | */ |
| 624 | replaceWith(schema: Schema, migrate = false) { |
| 625 | // reuse the same id? or replaceSelection |
| 626 | schema = Object.assign({}, migrate ? this.export() : {}, schema) |
| 627 | return this.parent?.replaceChild(this, schema) |
| 628 | } |
| 629 | |
| 630 | /** |
| 631 | * replace a child node with a new node |
no test coverage detected