Add better undo support when inserting formatted text

This is generally a native browser behavior, and isn’t something Discourse is doing. Try testing against a plain text box in HTML.