Ckeditor 在编辑器中撤消事件

Ckeditor 在编辑器中撤消事件,ckeditor,Ckeditor,当我们触发撤销事件时,如果超过1000段的话,我会遇到CKEditor响应缓慢的问题 例: 123.1000您可以使用beforeCommandExec事件并检查撤消和重做事件。类似这样的东西,其中editorInstance是和CKEDITOR实例 editorInstance.on('beforeCommandExec',函数(e){ 如果(e.data.name=='undo'){ //先处理后撤消 } 如果(e.data.name==='redo'){ //重做前处理 } });

当我们触发撤销事件时,如果超过1000段的话,我会遇到CKEditor响应缓慢的问题 例:


1

2

3

.1000

您可以使用beforeCommandExec事件并检查撤消和重做事件。类似这样的东西,其中editorInstance是和CKEDITOR实例

editorInstance.on('beforeCommandExec',函数(e){
如果(e.data.name=='undo'){
//先处理后撤消
}
如果(e.data.name==='redo'){
//重做前处理
}
});