youssefreda9's picture
fix: Unified undo/redo system for all editor actions BEFORE: - Toolbar undo used browser execCommand('undo') (native) - Ctrl+Z used custom stack - Typing was NOT tracked in undo stack - Only corrections/dismiss saved undo state AFTER: - Toolbar undo/redo → custom stack (same as Ctrl+Z/Y) - Typing tracked via debounced pushUndoStateDebounced (800ms) - Paste saves undo state immediately - Formatting (bold/italic/etc) saves undo state before change - Initial editor state captured on load - Stack increased: 50 → 100 entries All user actions now have undo/redo support: - Typing (debounced) - Paste - NLP corrections (apply/dismiss) - Formatting (bold, italic, etc) - Apply all suggestions
8e4a7a7