I have this contentEditable div. I want to know how to catch the event when the element saves its html content. By doing undo
it does not undoing 1 by 1 character each press. It actually saves the content history periodically.
For instance if I type Hello world
fastly, when I undo it, it will undo the whole Hello world
.
If I type Hello world
then pause for 5 seconds, then type another John Smith
fastly. If I press undo it will undo John Smith
first, then it will undo Hello World
after that.
My question is, how can I know when the history is saved? And what is the content for each history save?