Commit f7a3254d authored by lixy's avatar lixy

域名

parent 18d1004b
......@@ -19,21 +19,22 @@
* 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
* window.UEDITOR_HOME_URL = "/xxxx/xxxx/";
*/
// window.UEDITOR_HOME_URL = "/static/utf8-jsp/";
var getHost = function(url) {
var host = "null";
if(typeof url == "undefined"
|| null == url)
url = window.location.href;
var regex = /.*\:\/\/([^\/]*).*/;
var match = url.match(regex);
if(typeof match != "undefined"
&& null != match)
host = match[1]+"/";
return host;
}
var URL = getHost();
window.UEDITOR_HOME_URL = "/static/utf8-jsp/";
var getHost = function(url) {
var host = "null";
if(typeof url == "undefined"
|| null == url)
url = window.location.href;
var regex = /.*\:\/\/([^\/]*).*/;
var match = url.match(regex);
if(typeof match != "undefined"
&& null != match)
host = match[1];
return host+"/";
}
var URL = window.UEDITOR_HOME_URL || getUEBasePath();
/**
* 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
*/
......@@ -43,7 +44,7 @@
UEDITOR_HOME_URL: URL
// 服务器统一请求接口路径
, serverUrl:"/api/universal/file/app/unauth/ueditor"
, serverUrl:"api/universal/file/app/unauth/ueditor"
//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
, toolbars: [[
......@@ -446,9 +447,8 @@
function getUEBasePath(docUrl, confUrl) {
return URL;
// return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment