apply method
Apply this delta (redo). Replaces affected nodes with their post-mutation state and restores the post-mutation cursor.
Implementation
@override
void apply(FluentDocument document) {
if (index < 0 || index > document.content.nodes.length) {
print('[UNDO_WARN] NodeInsertDelta.apply index $index out of bounds');
return;
}
document.content.nodes.insert(index, _deserializeNode(nodeJson));
document.invalidateNodeIndex();
newCursor.restore(document);
}