KindEditor編輯器調(diào)用方法
來源:程序員人生 發(fā)布時(shí)間:2014-02-03 14:19:46 閱讀次數(shù):3039次
KindEditor編輯器調(diào)用方法,這個(gè)編輯器可使用到任何語(yǔ)言中,他是一個(gè)純js的編輯器,但它默認(rèn)的編輯是utf-8如果是gb2312編輯的朋友就是KindEditor.js打開,重保存為gb2312就可以使用在gb2312文檔中了,否則就是出現(xiàn)亂碼.
下面為說說kindeditor的調(diào)用方法吧,我們?cè)谙仍谛枰褂迷摼庉嬛械奈臋n中調(diào)用KindEditor.js,好了我們舉個(gè)例子說明:
- <script type="text/javascript" src="KindEditor.js"></script>/這個(gè)在文檔的頭部了,
- <div style="font-size:12px;margin-bottom:5px;margin-left:5px;"> </div>
- <input type="hidden" name="content" >
-
- <script type="text/javascript">
- var editor = new KindEditor("editor");
- editor.hidenName = "content";
- editor.skinPath = "./skins/tiny/";
- editor.iconPath = "./icons/";
- editor.imageAttachPath = "./attached/";
- editor.imageUploadCgi = "upload_cgi/upload.php";
- editor.cssPath = "common.css";
- editor.editorWidth = "99%";
- editor.editorHeight = "270px";
- editor.show();
- function KindSubmit() {
- editor.data();
- }
- </script>
就這么簡(jiǎn)單了。
生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對(duì)您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈(zèng)