百度在线编辑器ueditor的使用
2016-03-29 10:10
197 查看
1、引入ueditor文件包到项目中(官网下载,分为utf-8还有gbk等好多版本,自己看着下)
2、把ueditor引入到jsp页面中,可参考百度提供的示例
3、配置文件在config.json和ueditor.config.js中修改
4、文件上传的话要在项目的lib中导入ueditor中的jar包(5个)
5、注意, var ue = UE.getEditor('editor'); 中editor其实是输入文本域的id,实例就行了。
2、把ueditor引入到jsp页面中,可参考百度提供的示例
<script type="text/javascript" charset="utf-8" src="${basePath }js/ueditor/ueditor.config.js"></script> <script type="text/javascript" charset="utf-8" src="${basePath }js/ueditor/ueditor.all.min.js"> </script> <!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败--> <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文--> <script type="text/javascript" charset="utf-8" src="${basePath }js/ueditor/lang/zh-cn/zh-cn.js"></script> <script> window.UEDITOR_HOME_URL = "${basePath }js/ueditor/"; var ue = UE.getEditor('editor'); </script>
3、配置文件在config.json和ueditor.config.js中修改
4、文件上传的话要在项目的lib中导入ueditor中的jar包(5个)
5、注意, var ue = UE.getEditor('editor'); 中editor其实是输入文本域的id,实例就行了。
相关文章推荐
- LINQ Query Expressions
- UGUI 之soft clip
- iOS关于UITableView的用法和问题,都写到这里了!
- 一套漂亮的网站后台管理系统模板Flatty ui
- Android设计模式——Builder模式
- angular单元测试与自动化UI测试实践
- 在哪种情况下,QuerySet将从数据库中取值
- 《iOS Human Interface Guidelines》——Refresh Control
- 客户端GUI测试技术和自动化测试架构设计简谈
- 关于NGUI Input Axis Mouse ScrollWheel is not setup. 问题的解决
- LeetCode Implement Queue using Stacks
- 大数据协作框架Hue
- Uiautomator 2.0之Configrator类学习小记
- JSON 用Iterator 遍历key 和value
- request的setAttribute()怎么用的?
- UITextField只要求输入数字和字母,并限制长度
- 被大家忽略的UITableViewHeaderFooterView,cell的展开和折叠
- UI控件--UITableView
- 研究openstack中libguestfs密码不能注入到lvm分区镜像中问题
- Fuel 30 分钟快速安装OpenStack(转)