xhEditor 简约而不简单哦

  1. 官网下载最新xhEditor,http://xheditor.com/
  2. 在站点下新建xheditor文件夹,讲下载文件包放至其中 也可以下载我包好的,当前最新版本1.1.7 点击下载
  3. 在线 http://xheditor.com/wizard 生成textarea或者TextBox 的class 样式
    例如: <asp:TextBox ID="tb_me" runat="server"  class="xheditor-mini {skin:'nostyle','350',height:'200',layerShadow:1,forcePtag:false,cleanPaste:3}" TextMode="MultiLine"></asp:TextBox>
  4. 在head中引入
    <link rel="stylesheet" href="xheditor/common.css" type="text/css" media="screen" />
    <script type="text/javascript" src="xheditor/jquery/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="xheditor/xheditor-1.1.7-zh-cn.min.js"></script>
  5. 预览页面如下去可以使用了呵呵

最后需要注意的是要修改common.css文件的margin哦 否则页面样式会出问题

原文地址:https://www.cnblogs.com/ninepts/p/2319844.html