1、官网地址

2、官网下载:http://kindeditor.net/down.php

3、文件夹说明:

4、基本使用

<body>
<div style="width: 1200px; margin: 0 auto;"><textarea id="content"></textarea>
</div>
<script src="/static/jquery-1.12.4.js"></script>
<script src="/static/plugins/kindeditor/kindeditor-all.js"></script>
<script>$(function(){KindEditor.create("#content", {width: '100%',       // 文本框宽度(可以百分比或像素)height: '300px',     // 文本框高度(只能像素)minWidth: 200,       // 最小宽度(数字)minHeight: 400      // 最小高度(数字)});});</script>
</body>

5、详细参数

 http://kindeditor.net/docs/option.html

6、上传文件示例

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>kind</title>
</head>
<body>
<div style="width: 1200px; margin: 0 auto;"><textarea id="content"></textarea>
</div>
<script src="/static/jquery-1.12.4.js"></script>
<script src="/static/plugins/kindeditor/kindeditor-all.js"></script>
<script>$(function(){KindEditor.create("#content", {uploadJson: "/upload_img/",allowFileManager: true,fileManagerJson: "/file_manager/",extraFileUploadParams:{csrfmiddlewaretoken: "{{ csrf_token }}",},});});</script>
</body>
</html>
import json, os, time'''
xframe_options_exempt: 页面地址允许frame加载
xframe_options_sameorigin: 页面地址只能被同源域名页面嵌入到frame中
xframe_options_deny: 页面地址不能被嵌入到任何frame中
'''
from django.views.decorators.clickjacking import xframe_options_exempt, xframe_options_sameorigin, xframe_options_denydef kind(request):return render(request, "kind.html")@xframe_options_exempt
def upload_img(request):print(request.FILES)dic = {'error': 0,'url': '/static/imgs/o_Warning.png','message': '错误了...'}return HttpResponse(json.dumps(dic))def file_manager(request):"""文件管理:param request::return:"""dic = {}root_path = '/Users/severen/Desktop/day24'static_root_path = '/static/'request_path = request.GET.get('path')print(request_path)if request_path:abs_current_dir_path = os.path.join(root_path, request_path)move_up_dir_path = os.path.dirname(request_path.rstrip('/'))dic['moveup_dir_path'] = move_up_dir_path + '/' if move_up_dir_path else move_up_dir_pathelse:abs_current_dir_path = root_pathdic['moveup_dir_path'] = ''dic['current_dir_path'] = request_pathdic['current_url'] = os.path.join(static_root_path, request_path)file_list = []for item in os.listdir(abs_current_dir_path):abs_item_path = os.path.join(abs_current_dir_path, item)a, exts = os.path.splitext(item)is_dir = os.path.isdir(abs_item_path)if is_dir:temp = {'is_dir': True,'has_file': True,'filesize': 0,'dir_path': '','is_photo': False,'filetype': '','filename': item,'datetime': time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(os.path.getctime(abs_item_path)))}else:temp = {'is_dir': False,'has_file': False,'filesize': os.stat(abs_item_path).st_size,'dir_path': '','is_photo': True if exts.lower() in ['.jpg', '.png', '.jpeg'] else False,'filetype': exts.lower().strip('.'),'filename': item,'datetime': time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(os.path.getctime(abs_item_path)))}file_list.append(temp)dic['file_list'] = file_listreturn HttpResponse(json.dumps(dic))

7、XSS过滤特殊标签

KindEditor相关推荐

  1. 【kindeditor】KindEditor获取多个textarea文本框的值并判断非空

    kindeditor官网:http://kindeditor.net/demo.php 如何获取多个KindEditor中textarea文本框的值,方式很多种(带有HTML标签). var intr ...

  2. Kindeditor学习中的那些坑

    Kindeditor富文本编辑器还算比较好上手的一款插件吧,下面记录一下我在学习和实践中遇到的那些坑. 编辑器初始化方法和参数网上一搜一大把,不想搜的点这里,文档上各个参数已经写得很清楚了,直接拿过来 ...

  3. 一个KindEditor的插件[myFocus]

    声名:此作品用于学习交流  简介:使用KindEditor(富文本编辑器)提供的接口将myFocus(焦点图库)集成在KindEditor上 功能:在内容中显示焦点图 使用 下载此插件 并将其解压后的 ...

  4. kindeditor 批量上传 路径_FtpClient 实现文件上传

    FtpUtils 工具类封装 public static boolean uploadFile( String hostname, int port, String username, String ...

  5. php网页添加图片的代码,天天查询-PHP版的kindeditor编辑器加图片上传水印功能

    首先简单介绍一下kindeditor编辑器: KindEditor 是一套开源的在线HTML编辑器,开发人员可以用 KindEditor 把传统的多行文本输入框(textarea)替换为可视化的富文本 ...

  6. kindeditor扩展粘贴截图功能修改图片上传路径并通过webapi上传图片到图片服务器...

    2019独角兽企业重金招聘Python工程师标准>>> kindeditor是一个非常好用的富文本编辑器,它的简单使用我就不再介绍了. 而kindeditor却对图片的处理不够理想. ...

  7. kindeditor用法

    <?php require_once '../include.php'; checkLogined(); $rows=getAllCate(); //echo $rows; if(!$rows) ...

  8. KindEditor得不到textarea值的解决方法----摘至天涯

    以前有朋友遇到过这个问题,就是KindEditor在火狐下或者其他浏览器下都无法得到textarea文本框的值,点击表单提交按钮得到的是空白.昨天天涯PHP博客[http://blog.phpha.c ...

  9. KindEditor自动过滤首行缩进和全角空格的解决方法

    KindEditor 4.1.11: kindeditor-all.js 文件 第772行: var re = /(\s*)<(\/)?([\w\-:]+)((?:\s+|(?:\s+[\w\- ...

  10. 在DWZ框架中整合kindeditor复文本框控件

    今天上午在DWZ框架中整合kindeditor复文本框控件,发现上传图片是老是提示 "上传中,请稍候...",上网查看别人说可能是文件路径问题,在想以前在其他项目中用这个控件一直没 ...

最新文章

  1. 【HoorayOS】开源的Web桌面应用框架(第二版 v120311)
  2. python 两种多线程比较
  3. Java和Spring中线程池创建方法
  4. mysql 关键词相关度排序方法详细示例分析
  5. 《C#线程参考手册》读书笔记(三):.NET中的线程池
  6. 开源.NET(C#、VB.NET、J#等)脚本执行引擎(利用CodeDOM)
  7. layui分页完整实例php,使用 layui 后端分页的实例
  8. H5 video 播放器demo代码
  9. 数字证书格式转换:.key和.crt转换成.pem格式
  10. cubic算法优化_CUBIC拥塞拥塞控制算法
  11. 从零开始的VUE项目-09(vue-alipayer-v视频播放)
  12. nginx与react配合二级路由
  13. Lumen企业站内容管理实战 - 网站配置
  14. matlab坐标轴加粗
  15. 计算机毕业设计(附源码)python校园社团管理系统
  16. matlabff2函数_罚函数法MATLAB程序.doc
  17. windows11 安装vc++6.0
  18. 华为v65智能屏搭载鸿蒙咯嘛,华为智慧屏V65深测:真智慧or增智慧?
  19. WinSCP putty 客户端显示IP
  20. Advanced Science | 利用芽孢杆菌主导的具有独特合作模式的根际稳定核心菌群持续抑制玉米种传镰刀菌...

热门文章

  1. navicat12.1.18破解 亲测
  2. creo绘图属性模板_CREO工程图模板创建
  3. 【脑电数据十折交叉验证】实现对数据自动划分训练集与测试集得出平均分类准确率
  4. css 页面机械/数字电子 字体怎么实现?
  5. 基于ssm宠物医院管理系统获取(java毕业设计)
  6. 问题 N: [入门OJ]车辆统计(NHOI2011XX1)
  7. DHCP:(3)思科防火墙ASA上部署DHCP服务以及DHCP中继
  8. 字节版 趣味测试小程序源码
  9. Linux 使用yum下载软件
  10. Cocos2d-lua中lua代码加密成luac