在页面引用
代码如下:
<script src="Ueditor/editor_all.js" type="text/javascript"></script>
<script src="Ueditor/editor_config.js" type="text/javascript"></script>
<link href="Ueditor/themes/default/ueditor.css" rel="stylesheet" type="text/css" />
在页面加载控件
代码如下:
<textarea id="txteditor" name="txteditor" runat="server" cols="20" rows="2">
<p>请输入商品介绍</p>
</textarea>
<script type="text/javascript">
var editor = new baidu.editor.ui.Editor();
editor.render('txteditor');
//1.2.4以后可以使用一下代码实例化编辑器
UE.getEditor('txteditor')
</script>
<br />
<br />
<input id="Submit1" type="submit" value="submit" />