I think there are two related, but seperate problems here:
- Undo doesn’t work for the actions of toolbar buttons and shortcuts
- Using the toolbar buttons breaks the edit history of the input so using Ctrl + Z actually does really unexpected thing.
Is 1) really a problem no editor in the web has solved yet?
Same for 2) which is really confusing to users.