
<!-- 视频播放 -->
<link href="plugins/ueditor/third-party/video-js/video-js.css" rel="stylesheet">
<script src="plugins/ueditor/third-party/video-js/video.min.js"></script>
<script src="plugins/ueditor/third-party/video-js/html5media.min.js"></script>
修改配置文件:ueditor.config.js,添加xss过滤白名单
embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play','loop', 'menu', 'allowscriptaccess', 'allowfullscreen'],
以1.4.3为例子:
到ueditor.all.min.js文件中,定位到b.execCommand("inserthtml",g.join(""),!0)这个语句,
并在这个语句后面添加 b.fireEvent('afterUpVideo',k) 同时在我们的业务代码中写上监听事件,如下:
_editor.addListener('afterUpVideo', function (t, arg) { //侦听视频上传
console.debug(arg)
//在 b.execCommand("inserthtml",g.join(""),!0)
//添加 b.fireEvent('afterUpVideo',k)
})
,亲测可以哦,研究了半天呢。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)