从百度富文本官网下载源码http://ueditor.baidu.com/website/download.html#ueditor
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath %>">
<div class="bjui-pageContent">
<form action="<%=basePath%>weeklyreport/weeklyreport-save.do" method="post" data-toggle="validate" data-reloadNavtab="true">
<table class="table table-condensed table-hover">
<tbody>
<tr>
<td>
<label class="control-label x90" style="width: 105px;">周报:</label>
<script id="container" name="thisWeekWork" type="text/plain" >
</script>
</td>
</tr>
</tbody>
</table>
</form>
</div>
<div class="bjui-pageFooter">
<ul>
<li><button type="button" class="btn-close">关闭</button></li>
<li><button type="submit" id="submit" class="btn-default">保存</button></li>
</ul>
</div>
<script type="text/javascript">
var editorOption = {
toolbars: [[
'fullscreen', '|', 'undo', 'redo', '|',
'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
'directionalityltr', 'directionalityrtl', 'indent', '|',
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertframe', 'pagebreak', 'template', 'background', '|',
'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
'searchreplace', 'drafts'
]],
elementPathEnabled: false,
charset:"utf-8"
,initialFrameWidth:920 //初始化编辑器宽度,默认1000
,initialFrameHeight:500 //初始化编辑器高度,默认320
};
var ue = UE.getEditor('container',editorOption)
</script>
百度Editor 前端使用方式
最新推荐文章于 2023-08-11 17:00:27 发布