Hi JiHong88,
Can you add onchange event for auto update content?
onKeyUp event only track when I type. But I click toolbar button it can not track.
Hi @redone80 ,
Due to the nature of WYSIWIG implementations you are not dealing with form fields which natively have an onChange event that can be used to monitor for change. This is a content editable page division therefore the keyUp event (fired after content is updated) is currently the best way to watch for change. You would need to do something like fire the .getContents() function on the editor after each keyUp and compare it to the last saved contents to determine if change has occured - if you detect change then trigger the save event or any other event you want.
JiHong88 may have other advice to give.
DG
Hi @redone80 , @DeZZar is right.
Due to the nature of the "contenteditable" implementation, the "onchange" event does not occur.
Instead, will be able to implement the "onChange" event by detecting the history stack changes in the editor.
I will include it in the version to be updated today.
Thank you.
Hi @JiHong88, @DeZZar.
Thank for updating.
I think onChange event is important. Sometimes we just only use mouse. So onKeyUp event does not fire.