Kindeditor的安装与使用(富文本编编辑器)

安装步骤:
1.下载对应的版本 http://kindeditor.net/down.php
2.将kindeditor放入到对于的项目文件夹当中
3.在需要kindeditor的地方添加textarea标签,注意id必须唯一,宽度高度可以后期指定
<textarea id="editor_id" name="content" style="700px;height:300px;"> </textarea>

     4.在需要使用页面添加javascript脚本
    	<script charset="utf-8" src="{% static 'kindeditor/kindeditor-all-min.js' %}"></script> # 主要的js文件
	<script charset="utf-8" src="{% static '/kindeditor/lang/zh-CN.js' %}"></script>  # 中文文件
            <script>
                    KindEditor.ready(function(K) {
                            window.editor = K.create('#editor_id', {      # 最主要的语句
                            "100%",				
                            uploadJson : '/uploadFile/',   #上传文件路径
                            allowFileManager : true,    
                            resizeType : 1,             # 允许调整高度大小
                            height:'500px'              # 默认高度
                        });
                    });
            </script>
原文地址:https://www.cnblogs.com/Ailewent/p/14306982.html