I want reset the undo functionality after set Data method in ckeditor.
any one know please let me know.
editor.setData(content,function(){
this.checkDirty();
});
Use resetDirty()
Resets the "dirty state" of the editor so subsequent calls to checkDirty will return false if the user will not have made further changes to the content.
alert( editor.checkDirty() ); // e.g. true
editor.resetDirty();
alert(editor.checkDirty() ); // false
After the trouble of searching the clock All roads do not work I do not know the reason
The solution is
CKEDITOR.instances.editor1.setData('Text_Html',function() { this.resetUndo(); });
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.