Javascript is required...
simple-undo
a very basic javascript undo/redo stack for managing histories of basically anything
demo
Undo
Redo
source code