kindeditor 编辑器添加支持mp4视频上传
修改编辑器根目下 kindeditor-all.js
1、video添加为不需要过滤过的标签
video : ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess','controls'],
2、加上MP4视频类型
if (/\.(mp4)(\?|$)/i.test(src)) { return 'video/mp4'; }
3、解析视频类型
if(attrs.type=="video/mp4"){ var html = '<video '; _each(attrs, function(key, val) { html += key + '="' + val + '" '; }); html += 'controls="controls"/>'; }
4、允许上传mp4格式,我的是php语言的,修改对应 kindeditor/php/upload_json.php