2、编辑器个别操作的状态回调或出错回调

回调事件:onError()  

var editor_SDK= new CXO_API.CXEditor("editor_SDK", {
    "events": {
        "onError": onError,
        ...
    },
    ...
});
var onError = function (event) {
    console.log("编辑器错误: code " + event.data.errorCode + ", 描述" + event.data.errorDescription);
 //举例,强制保存后,判断文档内容是否保存成功
 if( event.data ){
            if( event.data.errorCode == 'forcesave' ){
                var desc = event.data.errorDescription;
                desc = JSON.parse(desc);
                if( desc.error == 0 ){
                    //保存成功
                }else{
                    //保存失败或异常
                }
            }else if( event.data.errorCode == 'setallcellvalue' ){
                var desc = event.data.errorDescription;
                desc = JSON.parse(desc);
                if( desc.error == 0 ){
                    //填充成功
                }else if( desc.error == -1 ){
                    //当前文档正处于协同编辑中
                }else{
                    //填充异常
                }
            }else if( event.data.errorCode == 'clearsheet' ){
                var desc = event.data.errorDescription;
                desc = JSON.parse(desc);
                if( desc.error == 0 ){
                    //清除成功
                }else if( desc.error == -1 ){
                    //当前文档正处于协同编辑中
                }else{
                    //清除异常
                }
            }
        }
};