有什么办法可以在setData之后重置ckeditor中的undo吗?

Is there any way to reset undo in ckeditor after setData?

我想在 ckeditor 中设置数据方法后重置撤消功能。

谁知道请告诉我。

editor.setData(content,function(){
    this.checkDirty();
});

使用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

搜索时钟的麻烦之后 条条大路都不行 我不知道原因

reset

resetDirty

resetUndo

解决方法是

CKEDITOR.instances.editor1.setData('Text_Html',function() { this.resetUndo(); });