(function () { window.UEDITOR_HOME_URL = "/plugins/ueditor/"; var URL = window.UEDITOR_HOME_URL || getUEBasePath(); window.UEDITOR_CONFIG = { UEDITOR_HOME_URL:URL ,imageUrl:URL+"asp/imageUp.asp" ,imagePath:"" ,scrawlUrl:URL+"asp/scrawlUp.asp" ,scrawlPath:"" ,fileUrl:URL+"asp/fileUp.asp" ,filePath:"" ,catcherUrl:URL +"asp/getRemoteImage.asp" ,catcherPath:"" ,imageManagerUrl:URL + "asp/imageManager.asp" ,imageManagerPath:"" ,wordImageUrl:URL + "asp/imageUp.asp" ,wordImagePath:"" ,zIndex:10 ,toolbars:[['fullscreen','source','|','undo','redo','|','bold','italic','underline','strikethrough','superscript','subscript','forecolor','backcolor','|','insertorderedlist','insertunorderedlist','indent','justifyleft','justifycenter','justifyright','|','cleardoc','removeformat','formatmatch','autotypeset','pasteplain','searchreplace','preview','|'],['fontfamily','fontsize','insertcode','emotion','link','unlink','inserttable','|','insertimage','imagenone','imageleft','imageright','imagecenter','|','insertvideo','music','insertattachment','map','gmap','insertframe','|','horizontal','spechars','wordimage',]] ,initialContent:'' ,initialStyle:'body{font-size:14px;font-family:微软雅黑,宋体,Arial,Helvetica,sans-serif;}' ,initialFrameHeight:100 ,autoHeightEnabled:true ,autoFloatEnabled:true ,sourceEditor:"codemirror" ,codeMirrorJsUrl:URL + "third-party/codemirror/codemirror.js" ,codeMirrorCssUrl:URL + "third-party/codemirror/codemirror.css" ,iframeCssUrl:'/css/editor.css' }; function getUEBasePath(docUrl, confUrl){return getBasePath( docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());}; function getConfigFilePath(){var configPath = document.getElementsByTagName('script');return configPath[ configPath.length -1 ].src;}; function getBasePath(docUrl, confUrl){ var basePath = confUrl; if(/^(\/|\\\\)/.test(confUrl)){basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/,'');}else if(!/^[a-z]+:/i.test( confUrl)){docUrl = docUrl.split( "#" )[0].split( "?" )[0].replace( /[^\\\/]+$/, '' );basePath = docUrl + "" + confUrl;}; return optimizationPath(basePath); }; function optimizationPath(path){ var protocol = /^[a-z]+:\/\//.exec( path )[ 0 ], tmp = null, res = []; path = path.replace( protocol, "" ).split( "?" )[0].split( "#" )[0]; path = path.replace( /\\/g, '/').split( /\// ); path[ path.length - 1 ] = ""; while(path.length){ if(( tmp = path.shift())=== ".."){res.pop();} else if(tmp !== "."){res.push( tmp ); }; }; return protocol + res.join("/"); }; window.UE = {getUEBasePath: getUEBasePath}; })();