当前位置:编程学习 > php >>

KindEditor编辑器调用方法

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.226511.com

补充:Php教程,常见问题 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,