kingEditor使用方法(1)

引入js文件:在Demo KingEditor文件夹下

  <script src="KingEditor/kindeditor.js" type="text/javascript"></script>
  <script type="text/javascript">
      KE.show({
          id: 'content2', // 注意这里
          resizeMode: 1,
          allowPreviewEmoticons: false,
          allowUpload: false,
          items: [
    'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
    'insertunorderedlist'] // 这里我已经去掉我没用到的功能 如图片,表情
      });
  </script>

 html 形式写法: 

<textarea id="content2" name="content" style="500px;height:200px;visibility:hidden;"></textarea>

.NET 写法

<asp:TextBox ID="content2" runat="server" TextMode="MultiLine"   // 蓝色字体这里可加可不加style="500px;height:200px;visibility:hidden;"></asp:TextBox>  //务必注意红色字体

Demo下载https://files.cnblogs.com/walleyekneel/KEtest.zip

原文地址:https://www.cnblogs.com/walleyekneel/p/2174312.html