百度ueditor学习使用

1、下载ueditor解压

2、

jsp里存放着开发所用到的jar包,导入项目即可

前端页面代码如下:

<center>
<form action="" method="post">
标题:<input name="title" value="" type="text" id="title" style="900px"/><br>
<div style="margin-top: 5px;margin-left: 45px">
<script id="editor" type="text/plain" style="900px;height:500px;" name="content"></script>
</div>
<div style="margin-left: -773px">
<input type="submit" value="发表帖子"/>
</div>
</form>
</center>

<script type="text/javascript">
//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
var ue = UE.getEditor('editor');

ue.addListener("ready", function () {
// editor准备好之后才可以使用
ue.setContent('${blob.content}');

});

</script>

原文地址:https://www.cnblogs.com/swite/p/5203819.html