首先声明本人用的版本为4.1.12
1、mp4视频格式上传:
修改kindeditor-all.js _mediaImg()方法
原代码
function _mediaImg(blankPath, attrs) { var width = attrs.width, height = attrs.height, type = attrs.type || _mediaType(attrs.src), srcTag = _mediaEmbed(attrs), style = ''; if (/\D/.test(width)) { style += 'width:' + width + ';'; } else if (width > 0) { style += 'width:' + width + 'px;'; } if (/\D/.test(height)) { style += 'height:' + height + ';'; } else if (height > 0) { style += 'height:' + height + 'px;'; } var html = '<img class="' + _mediaClass(type) + '" src="' + blankPath + '" '; if (style !== '') { html += 'style="' + style + '" '; } html += 'data-ke-tag="' + escape(srcTag) + '" alt="" />'; return html; }
修改为,红色部分为增加的代码
function _mediaImg(blankPath, attrs) { var width = attrs.width, height = attrs.height,