标签:
1、引包
<script>window.UEDITOR_HOME_URL = "${base}/common/ueditor/";</script> <script type="text/javascript" src="${base}/common/js/jquery.form.min.js" ></script> <script type="text/javascript" charset="utf-8" src="${base}/common/ueditor/ueditor.config.js"></script> <script type="text/javascript" charset="utf-8" src="${base}/common/ueditor/ueditor.all.js"></script> <script type="text/javascript" charset="utf-8" src="${base}/common/ueditor/contentblocks.js"></script>
2、页面中引用
<div class="editer"> <script id="editor" type="text/plain" name="" value="" style="height:300px;width:520px"></script> </div>
3、js加载
$(document).ready(function(){ <!--添加编辑器--> editor = new UE.ui.Editor(); editor.render("editor"); editor.ready(function(){ updateParentIframeHeight(); }) <!--添加编辑器--> });
4、获得富文本中内容
var text = UE.getEditor(‘editor‘).getContentTxt();
标签:
原文地址:http://www.cnblogs.com/volare/p/4285677.html