While a text was being edited, undo and redo did not reach the editor.
Keep a bounded content and selection history for each editing session.
Group committed compositions and styled insertions, leave IME previews
out, and start over when another change replaces the content.
Route keyboard shortcuts, native history input and the Edit menu to the
editor. The menu takes the focus, so focus the editor before restoring.
Restore UTF-16 selections through a new WASM binding.
AI-assisted-by: claude-opus-5-5