Kindeditor的安装与使用(富文本编编辑器)
生活随笔
收集整理的這篇文章主要介紹了
Kindeditor的安装与使用(富文本编编辑器)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
安裝步驟:
1.下載對應的版本 http://kindeditor.net/down.php
2.將kindeditor放入到對于的項目文件夾當中
3.在需要kindeditor的地方添加textarea標簽,注意id必須唯一,寬度高度可以后期指定
<textarea id="editor_id" name="content"> </textarea>
4.在需要使用頁面添加javascript腳本
<script charset="utf-8" src="{%%20static%20'kindeditor/kindeditor-all-min.js'%20%}"></script> # 主要的js文件
<script charset="utf-8" src="{%%20static%20'/kindeditor/lang/zh-CN.js'%20%}"></script> # 中文文件
<script>
KindEditor.ready(function(K) {
window.editor = K.create('#editor_id', { # 最主要的語句
"100%",
uploadJson : '/uploadFile/', #上傳文件路徑
allowFileManager : true,
resizeType : 1, # 允許調整高度大小
height:'500px' # 默認高度
});
});
</script>
總結
以上是生活随笔為你收集整理的Kindeditor的安装与使用(富文本编编辑器)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 川崎病能不能吃螺旋藻
- 下一篇: 日语喜欢你怎么说(日语撩人的情话中文谐音