ACMS.Dispatch.emoditor=function(elm){var callback=function(toolbar,config){config.toolbar=toolbar;if(0||"undefined"==typeof window["CKEDITOR"]||"undefined"==typeof CKEDITOR["instances"]||"undefined"==typeof CKEDITOR.instances[elm.name]){var name=$(elm).attr("name"),editor=CKEDITOR.instances[name];if(editor){CKEDITOR.remove(editor);return null}$(elm).data("emoditor",CKEDITOR.replace($(elm).get(0),config));CKEDITOR.on("dialogDefinition",function(ev){var dialogName=ev.data.name;var dialogDefinition=
ev.data.definition;if(dialogName=="table"){var infoTab=dialogDefinition.getContents("info");txtWidth=infoTab.get("txtWidth");txtWidth["default"]=""}});return $(elm).data("emoditor")}else return null};var self=arguments.callee;if(typeof window["CKEDITOR"]!=="undefined"||self.loaded)callback(ACMS.Config.emoToolbar,ACMS.Config.emoConfig);else if(self.stack)self.stack.push(callback);else{ACMS.Dispatch._ckeditorPre();self.stack=[callback];(new ACMS.SyncLoader).next(ACMS.Config.jsRoot+"library/ckeditor/ckeditor.js").load(function(){ACMS.Dispatch._ckeditorPost();
self.loaded=true;while(self.stack.length)self.stack.shift()(ACMS.Config.emoToolbar,ACMS.Config.emoConfig)})}};
