KindEditor編輯器調用方法,這個編輯器可使用到任何語言中,他是一個純js的編輯器,但它默認的編輯是utf-8如果是gb2312編輯的朋友就是KindEditor.js打開,重保存為gb2312就可以使用在gb2312文檔中了,否則就是出現亂碼.
下面為說說kindeditor的調用方法吧,我們在先在需要使用該編輯中的文檔中調用KindEditor.js,好了我們舉個例子說明:
<script type="text/javascript" src="KindEditor.js"></script>/這個在文檔的頭部了,
<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>
就這麼簡單了,
注明:轉載請說明原處www.111cn.cn