當前位置:編程學習大全網 - 網站源碼 - html中加入KindEditor除了引入js文件還要怎麽實現

html中加入KindEditor除了引入js文件還要怎麽實現

①:引入jquery.js;

②:引入KindEditor.js;

③:引入KindEditor對應的css;

④:給Html中的文本域賦予壹個id;如:

<textarea id="product"></textarea>

⑤:在js中調用,如:

var editor1;

KindEditor.ready(function(K){

editor1 = K.create("#product",{

width: "80%", //設置文本域的寬度

height: '151px', //設置文本域的高度

//設置文本域的顯示主題風格(需要根據引入的kingEditor主題而定)

themeType : 'simple',

syncType: 'form', //同步表單

resizeType: 0, //禁止用戶拖動文本域

afterBlur: function(){this.sync();} //將kindeditor的值同步到textarea

});

這是基本的,其他屬性可以查看KindEditor的API教程,有詳細介紹

  • 上一篇:如何ping內網和外網?又只能區別內網和外網?
  • 下一篇:《夢幻西西遊》txt全集下載
  • copyright 2024編程學習大全網