Hookup pattern to internal tinymce events.

This should now finally support undo, redo and other events (e.g. image
resizing).