I’m working on a web content editor which needs the basic Undo button, found in most editors, like Word. Is there a way of “sending” the CTRL + Z command through javascript when the users clicks the Undo button on my web app??
@96turnerriFeb 10.2004 — #What are you attempting to redo and undo. Some applications carry a memory that records what you are doing and will repeat the steps when prompted. A built feature does not exists in JavaScript.
@daf5431authorFeb 10.2004 — #Well.. see.. I use a textarea for the editing. If the user accidently deletes a word or a sentence, then instead of hitting the CTRL + Z keys on the keyboard to call the undo command he rather clicks an undo button that calls a javascript function that carries out the same operation as the keyboard command would.
I've found something called document.execCommand() but i can't quite figure it out.