deleteNode method

void deleteNode(
  1. Node node
)

Deletes the Node in the document.

Implementation

void deleteNode(Node node) {
  deleteNodesAtPath(node.path);
  if (beforeSelection != null) {
    final nodePath = node.path;
    final selectionPath = beforeSelection!.start.path;
    if (!(nodePath.equals(selectionPath))) {
      afterSelection = beforeSelection;
    }
  }
}