loadContent method
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();
}