Two internals matter most in editable scenarios.
ByteOverlay uses:
That lets insert and delete operations reshape the logical document without mutating the original source immediately.
EditJournal records logical operations, not UI gestures. This keeps undo and redo independent from the view.
Use BeginBatch() and EndBatch() when one user command should undo as a single unit, such as replace-all or range transforms.