【CKeditor】使用SpringMVC处理CKeditor上传图片

时间:2014-07-29 16:19:59   收藏:0   阅读:3615

0、了解CKeditor的相关文件

1、开启CKeditor上传图片功能

官方说明

简明的说,就是只需要在创建CKeditor时,添加以下两个配置:

在用CKEDITOR.replace()中配置

filebrowserBrowseUrl: ‘自定义的请求‘,
filebrowserUploadUrl: ‘自定义的请求

或,在config.js添加如下配置

config.filebrowserBrowseUrl=‘自定义的请求‘,
config.filebrowserUploadUrl=‘自定义的请求‘ 

2、编写自定义的请求



问题及解决方案:

1、解决ckeditor上传,返回时显示js代码不显示图片的问题

解决ckeditor上传,返回时显示js代码不显示图片的问题  

2、跨域问题

chrome console log:

Refused to display ‘http://localhost:8080/webcnmain/ifacompany/article/uploadArticleImageForCkeditor?CKEditor=articleContentZH&CKEditorFuncNum=1&langCode=zh-cn‘ in a frame because it set ‘X-Frame-Options‘ to ‘DENY‘.

response.setHeader("X-Frame-Options", "SAMEORIGIN");

【CKeditor】使用SpringMVC处理CKeditor上传图片,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!