UEditor 编辑器跨域上传解决方法
2013-06-12 12:46
686 查看
解决的方法:
1.在 ueditor\dialogs\internal.js 加入 document.domain = '根域名';
2.在当前页面同样指定根域名:
复制代码 代码如下:<script type="text/javascript">
document.domain = "根域名";
</script>
这样在 chrome、firefox 下没有问题,但在 ie 下还需要简单修改下 UEditor,在 editor.js 中找到:
this._setup( container.firstChild.contentWindow.document );
在它上边加入下边的代码:
复制代码 代码如下:if (ie) {
document.getElementById('baidu_editor_' + this.uid).src = "javascript:(function(){document.open();document.domain='"+document.domain+"';document.close();})()";
}
接下来找到:
me.document = doc;
在它下边加入:
me.document.domain='根域名';
到这里就解决了 UEditor 跨域传图片的问题,希望对大家有所帮助。
作者:东奎
您可能感兴趣的文章:
相关文章推荐
- UEditor 编辑器跨域上传解决方法
- ueditor编辑器asp版不能上传图片的解决方法(800a0046)
- ueditor编辑器asp版不能上传图片的解决方法 500错误
- ueditor编辑器不能上传图片问题的解决方法
- ueditor编辑器asp版不能上传图片的解决方法(800a0046)
- 百度编辑器(ueditor)上传视频二次调用丢失链接的解决方法
- 关于Struts2+spring中使用百度UEditor编辑器显示未找到上传数据的解决方法
- form+iframe解决跨域上传文件的方法
- Kindeditor编辑器 jsp上传错误解决方法 与struts2冲突整合
- 百度Ueditor编辑器的Html模式自动替换样式的解决方法
- asp.net应用百度编辑器(UEditor)上传图片跟上次附件不成功的解决办法
- 百度UEditor调用单图片上传功能的解决方法
- 关于百度富文本编辑器ueditor的.NET版本地图片上传提示uploader类同时存在于两个dll中的解决方法
- 解决百度 ueditor v1.4.3 编辑器上传图片失真的bug?
- eWebeditor编辑器上传图片路径错误解决方法[疑难杂症]【转,作者:unvs】
- struts2 jsp ueditor 上传图片失败,获取不到值,解决方法
- Kindeditor编辑器 jsp上传错误解决方法 与struts2冲突整合
- phpcms v9的后台编辑器无法上传图片的解决方法
- 百度编辑器不能上传图片的问题解决方法
- UEditor上传图片被压缩得模糊的解决方法