<div class="form-group"> <label class="col-sm-2 control-label">简介</label> <div class="col-sm-7"> <input type="hidden" value="${escapeXml(teacher.info!)}" id="teacherinfo"/> <script id="editor" name="teacher.info" type="text/plain" style="width:680px;height:500px;"></script> </div> </div>
前端需要放一个隐藏域,然后同过这样的方法setContent
<script type="text/javascript"> var ue = UE.getEditor('editor',{ onready:function(){ this.setDisabled('cleardoc'); this.setContent($("#teacherinfo").val(),true); } }); </script>