loadContent method

void loadContent(
  1. Root newContent
)

Loads new content into the document, resetting cursor and selection.

Implementation

void loadContent(Root newContent) {
  _content = newContent;
  invalidateNodeIndex();
  _cursor.moveTo(newContent.nodes.first.id, 0);
  _selectionManager.clear();
  updateContent();
}