Oh yeah, definitely. The browser implementation should be fine.
My point is that currently Discourse breaks the built-in browser implementation by doing stuff like
currentContent = $('#composer').value;
newContent = currentContent + "some extra text";
$('#composer').set('value', newContent);
The browser has no way to know that text has simply been appended. Setting the value does not add anything to the browser undo history.
This is what happens using the editor buttons at the moment:
(to be clear, after making the text bold, I just pressed cmdz repeatedly)