UEditor 百度富文本编辑器
1.将下载来的UEditor文件夹导入到所需项目中
2.在页面中添加相关css\js引用
<link rel="stylesheet" type="text/css" href="/UEditor/themes/default/ueditor.css" />
<script src="/UEditor/editor_config.js" type="text/javascript"></script>
<script src="/UEditor/editor_all.js" type="text/javascript"></script>
3.调用绑定到textarea等类似控件上,将runat="server"
<textarea name="UEditor1" id="UEditor1" rows="4" cols="40" wrap="virtual" runat="server"></textarea>
<script type="text/javascript">
var option = {};
var UEditor1 = new baidu.editor.ui.Editor(option);
UEditor1.render('UEditor1');
</script>
4.赋值和调用数据
divHtml.InnerHtml = Request.Form["UEditor1"];
string str = Request.Form["UEditor1"];