extraPlugins里设置了imagebrowser图片浏览和filebrowser文件浏览。然后为其配置处理请求的URL:
config.filebrowserImageBrowseUrl = '/SHTracker/CKEditor/Browse type=Images';
config.filebrowserImageUploadUrl = '/SHTracker/CKEditor/FileUpload type=Images';
config.filebrowserBrowseUrl = '/SHTracker/CKEditor/Browse type=docs';
config.filebrowserUploadUrl = '/SHTracker/CKEditor/FileUpload type=docs';
请确保你的URL可以正确访问。此时,这个CKEditor的文件图片上传插件就完成了。
总结
相信不愿意花钱买CKEditor插件的朋友一定用的上此功能。对于一个富文本编辑器,怎么能没有文件图片上传功能呢?CKEditor又这么简单好用,功能强大,实在没有勇气放弃它而去选择其它的产品。自已从零开始开发一个富文本编辑器?重复造轮子的活儿没有几个人愿意干吧?希望能帮到有需要的人,如果用上了请顶一下吧,特此感谢~~