# KindEditor 优化版 **Repository Path**: javascriptplugins/kindeditor ## Basic Information - **Project Name**: KindEditor 优化版 - **Description**: kindeditor最新H5优化版,多图片上传改为html5,优化支持MP4视频,支持文件大小限制,KindEditor更多功能完善中 - **Primary Language**: JavaScript - **License**: LGPL-2.1 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 6 - **Created**: 2022-09-16 - **Last Updated**: 2023-04-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 优化修改说明 * 基于最新版修改,主文件不加入插件,插件任然按需加载 * 图片上传优化,只可选择图片类型 * 图片大小限制 * 图片上传前压缩(暂未完成) * 多媒体上传支持mp4 * 多媒体上传支持大小限制 * 附件文件上传支持大小限制 * 多图片上传支持html5上传,支持压缩后上传 * 去掉flash上传功能,采用webUploader上传多图 * 美化弹层UI,按钮不再是硬邦邦的了 * 替换更可爱的表情 * 选择文件后自动上传改为点击按钮才上传 * 更多说明:https://gitee.com/aget/kindeditor ## 使用方式 * 快速使用(可以在服务环境下访问index.html页面测试参考) ``` //引入kindeditor-src.js文件 var editor = K.create('#content', { minHeight: 380, allowMediaUpload: true, allowMediaSize: 50, //限制媒体上传50M allowFileManager: false, allowMediaSize: 10, //限制视频文件上传10M allowFileSize: 10, //限制文件上传10M allowImageSize: 5, //限制图片上传5M uploadJson: './php/testdata.php?act=upload', //上传接口 filePostName: 'file', afterUpload: function (url,res,uploadType) { console.log(uploadType,res); } }); ``` * 接口数据返回格式 ``` { code:1, //1成功,否则失败 data: {url:'上传成功的文件地址'}, msg:'提示信息' } ``` ## What is KindEditor? KindEditor is a lightweight, Open Source(LGPL), cross browser, web based WYSIWYG HTML editor. KindEditor has the ability to convert standard textareas to rich text editing. ## Official site http://kindeditor.org/ ## Contributors * Timon Lin * daif alotaibi (http://daif.net/) : Arabic Translation * fisker (https://github.com/fisker) : QQ style theme * composite (https://github.com/composite) : Korean Translation