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>
(责任编辑:最模板) |