KindEditor为当前最新版本——v4.1.10,下载地址为:
ckplayer为当前最新版本——6.6,下载地址为:
上传了flv、mp4文件,经测试可用,其他格式暂未测试
1.在kindeditor\plugins下新建文件夹InsertPlugins
2.将ckplayer文件夹拷贝到kindeditor\plugins\InsertPlugins下
3.修改kindeditor\kindeditor.js (目的是增加getpath(url)方法)
在
K.mediaImg = _mediaImg; K.clearMsWord = _clearMsWord; K.tmpl = _tmpl;
下方新增一个可调用方法
K.getpath = _getpath;
在
K.formatUrl = _formatUrl; K.formatHtml = _formatHtml; K.getCssList = _getCssList; K.getAttrList = _getAttrList; K.mediaType = _mediaType; K.mediaAttrs = _mediaAttrs; K.mediaEmbed = _mediaEmbed; K.mediaImg = _mediaImg; K.clearMsWord = _clearMsWord; K.tmpl = _tmpl; K.getpath = _getpath;
上方添加
function _getpath(z){ var d = unescape(window.location.href).replace('file:///', ''); var k = parseInt(document.location.port); var u = document.location.protocol + '//' + document.location.hostname; var l = '',e = '',t = ''; var s = 0; var r = z.split('//'); if (r.length > 0) { l = r[0] + '//' } var h = 'http|https|ftp|rtsp|mms|ftp|rtmp'; var a = h.split('|'); if(k!=80){