Undo/Redo—initial implementation

WYMeditor's undo is, in some cases, not accurate.
Link dialog uses new named function.