$rte.Editor=$rte.Core._extends(function(base,type){ var tempdiv=document.createElement("DIV"); this.init=function(config,frame,win,loader){ this._config=config; this._loader=loader; this._starttime=new Date().getTime(); config.skin_div.editor=this; base.init.apply(this,[config,frame,win]); this._FindAndLoadUploader(); //if(!this._config._debugmode) //{ // setTimeout(this.delegate(function() // { // this.PreloadDialogUrl("_dialog.xml"); // this.PreloadDialogUrl("browsedialogbase.xml"); // this.PreloadDialogUrl("menu_context_default.xml"); // }),this._config.delay_preload||5000); //} } this.Dispose=function() { base.Dispose.apply(this); this._config.skin_control.dispose(); } this.GetConfig=function() { return this._config; } this.GetLangText=function(name,nullifnotfound) { return this._loader.getLangText.apply(this._loader,arguments); } this._InitUserDataBehavior=function(cate) { if(!config.userDataBehavior)return false; if(!config.userDataBehavior.load)return false; config.userDataBehavior.load("rte-"+cate); return true; } this.SupportLocalData=function() { var config=this._config; if(config.localStorage) return true; if(config.userDataBehavior&&config.userDataBehavior.load) return true; return false; } this.SetLocalData=function(cate,name,value) { var config=this._config; if(config.localStorage) { config.localStorage.setItem(cate+"-"+name,value); return; } if(this._InitUserDataBehavior(cate)) { config.userDataBehavior.setAttribute(name,value); config.userDataBehavior.save("rte-"+cate); return; } } this.GetLocalData=function(cate,name) { var config=this._config; if(config.localStorage) { return config.localStorage.getItem(cate+"-"+name); } if(this._InitUserDataBehavior(cate)) { return config.userDataBehavior.getAttribute(name); } } this._FindAndLoadUploader=function() { this.uploaderhidden=document.getElementById(this._config.uploaderid); if(this.uploaderhidden==null)return; if(this.uploaderhidden.internalobject) { this._SetupUploader(); } else { this.uploaderhidden.parentNode.style.display=""; this.uploaderhidden.handleinitialize=this.delegate(function() { this.uploaderhidden.parentNode.style.display='none'; this._SetupUploader(); }); } } this._CreateUploaderHandler=function(eventName) { var editor=this; return function Dispatcher() { var uploader=this; var arr=[uploader]; for(var i=0;i