标签:
1:添加插件包
2:添加文件上传的jar包
3:页面引入ueditor插件
<!-- ueditor -->
<link type="text/css" href="${root}/js/ueditor1.4.3/themes/default/css/ueditor.css" />
<script type="text/javascript" src="${root}/js/ueditor1.4.3/ueditor.config.js"></script>
<script type="text/javascript" src="${root}/js/ueditor1.4.3/ueditor.all.js"></script>
4:加载编辑器容器
<!-- 加载编辑器的容器 -->
<script id="container" name="m.content" type="text/plain" style="height:260px">
${(m.content)!}
</script>
5:初始化ueditor:在页面加载完毕后
/*ueditor编辑器菜单*/
var toolbars = [[
‘fullscreen‘, ‘source‘, ‘|‘, ‘undo‘, ‘redo‘, ‘|‘,
‘bold‘, ‘italic‘, ‘underline‘, ‘strikethrough‘,‘removeformat‘, ‘formatmatch‘, ‘autotypeset‘, ‘blockquote‘, ‘pasteplain‘, ‘|‘, ‘forecolor‘, ‘backcolor‘, ‘insertorderedlist‘, ‘insertunorderedlist‘, ‘|‘,
‘rowspacingtop‘, ‘rowspacingbottom‘, ‘lineheight‘, ‘|‘,
‘customstyle‘, ‘paragraph‘, ‘fontfamily‘, ‘fontsize‘, ‘|‘,
‘directionalityltr‘, ‘directionalityrtl‘, ‘indent‘, ‘|‘,
‘justifyleft‘, ‘justifycenter‘, ‘justifyright‘, ‘justifyjustify‘, ‘|‘, ‘touppercase‘, ‘tolowercase‘, ‘|‘,
‘link‘, ‘unlink‘, ‘anchor‘, ‘|‘,
‘simpleupload‘, ‘insertimage‘,‘attachment‘, ‘pagebreak‘, ‘template‘, ‘|‘,
‘horizontal‘,
‘inserttable‘, ‘|‘,
‘print‘, ‘preview‘, ‘searchreplace‘, ‘help‘
]];
/*初始化ueditor*/
var options = {elementPathEnabled :false,wordCount :false,toolbars:toolbars};
//初始化ueditor
var ue = UE.getEditor(‘container‘,options);
标签:
原文地址:http://www.cnblogs.com/lulian/p/5456732.html