Web Cabin's Undo Manager can be used to effectively provide undo/redo events into your own web application with ease.  A demonstration can be found here: http://undo.webcabin.org/