当前位置: 移动技术网 > IT编程>脚本编程>编辑器 > UEditor 编辑器跨域上传解决方法

UEditor 编辑器跨域上传解决方法

2017年12月08日  | 移动技术网IT编程  | 我要评论

解决的方法:

1.在 ueditor\dialogs\internal.js 加入 document.domain = '根域名';

2.在当前页面同样指定根域名:

这样在 chrome、firefox 下没有问题,但在 ie 下还需要简单修改下 ueditor,在 editor.js 中找到:

this._setup( container.firstchild.contentwindow.document );

在它上边加入下边的代码:

接下来找到:

me.document = doc;

在它下边加入:

me.document.domain='根域名';

到这里就解决了 ueditor 跨域传图片的问题,希望对大家有所帮助。

作者:东奎 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网