clear method

void clear()

Clears all by resetting the controller.

This will discard the old root.

Implementation

void clear() {
  root = TeXNode(null);
  currentNode = root;
  currentNode.courserPosition = 0;
  currentNode.setCursor();
  notifyListeners();
}