(function () { window.UEDITOR_HOME_URL = sitepath+adminpath+"inc/ueditor/"; var URL = window.UEDITOR_HOME_URL || getUEBasePath(); window.UEDITOR_CONFIG = { UEDITOR_HOME_URL:URL ,upfolder:upfolder ,sitepath:sitepath ,adminpath:adminpath ,imageUrl:sitepath+adminpath+"inc/webuploader/upload.asp?uptype=image&upfolder="+upfolder ,imagePath:"" ,fileUrl:sitepath+adminpath+"inc/webuploader/fileUp.asp" ,filePath:"" ,catcherUrl:sitepath+adminpath+"inc/webuploader/getRemoteImage.asp?upfolder="+upfolder ,catcherPath:"" ,imageManagerUrl:sitepath+adminpath+"inc/webuploader/Manager.asp?uptype=image" ,imageManagerPath:"" ,wordImageUrl:sitepath+adminpath+"inc/webuploader/upload.asp?uptype=image&upfolder="+upfolder ,wordImagePath:"" ,zIndex:10 ,maximumWords:20000 ,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','|','pagebreak',]] ,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:sitepath+'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}; })();