oerpub/Aloha-Editor — pull request #129 by izak (2014-02-14 13:39:54+00:00)
Title: Undo/Redo plugin

Yet another undo-redo plugin.

This does something very simple: it simply keeps ten copies of the older elements on a stack and restores that element if asked to. To save space, it only stores the immediately bounding element where the change occured, so that in the general case it should only store copies of paragraphs.

A few things are still broken, this PR is here merely as a starting point.

- [] If you undo and redo math, it is horribly broken afterwards.
- [] At the moment it takes snapshots whenever there is two seconds silence. It should also distinguish between dom changes and character data changes, so that it does not remove multiple paragraphs if you type very quickly (with no two second delay).