Listen to undo/redo event in contenteditable div
问题 Is there a way to listen on all the ways a user could trigger an undo on a contenteditable div? For example when the user hits Control+Z, Right-click -> Undo, or in the file menu Edit -> Undo. I'm not looking for undo/redo algorithms or implementations, just the ability to listen to the event and overwrite the behavior. 回答1: Well, the Ctrl+Z/Y is possible, but I don't know about the Right-click->Undo/Redo part. $(document).keydown(function (e) { var thisKey = e.which; if (e.ctrlKey) { if