富文本(wangEditor框架)的使用教程

富文本的使用教程(wangEditor框架css

  一,相信不少人用過不少富文本的框架,如今我向你們推薦一個很實用的一個富文本框架,具備豐富的功能項,容易使用。html

    因此本博客介紹這個富文本編輯器的使用哈!以爲寫得不錯的請點贊哈,有建議歡迎提哈!^V^框架

    · 官網地址:ttp://www.wangeditor.com/編輯器

  二,控件展現效果spa

          haha 是否是很強大code

 

  三,使用步驟htm

      所需js  css包:blog

    

      wangEditor.min.css
      wangEditor.min.js

   1,第一步就是引入js和css包了,必需的教程

<link rel="stylesheet" type="text/css" href="/css/wangedit/wangEditor.min.css">
<script src="/js/wangedit/wangEditor.js"></script>

   

 

    2,初始化富文本框的js代碼圖片

<script>
  var editor1 = new wangEditor("introduce1");
    editor1.config.uploadImgUrl = "/imgView/uploadTmpImg/public.htm";//富文本上傳圖片的路徑,不上傳圖片這裏能夠忽略
    editor1.config.menuFixed = false;
    editor1.create();
</script>

 

   3,HTML代碼

<div id="introduce1" style="height:300px;"></div>

  4,得到文本框的內容方法

editor1.html();//獲得內容

 

    不足之處請給予指正謝謝♥

相關文章
相關標籤/搜索