- A+
所属分类:建站
1.在ueditor.config.js中,添加过滤白名单,添加之后,对应的属性就不会被编辑器过滤掉
source: ['src', 'type'],
embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play','autoplay','loop', 'menu', 'allowscriptaccess', 'allowfullscreen', 'controls', 'preload'],
iframe: ['src', 'class', 'height', 'width', 'max-width', 'max-height', 'align', 'frameborder', 'allowfullscreen']
2.如果加载的是ueditor.all.js,则修改这个文件里面的creatInsertStr方法,如图
embed,去掉type,class,pluginspage 三个属性,因为“application/x-shockwave-flash”,只能播放flash
video,添加“onclick="this.play();"”,点击就能播放,添加poster属性,这个是封面图,里面加你的图片路径,ok
3.如果想让插入的视频链接,不使用embed,使用video,可以更改switchImgAndVideo方法,edui-faked-video是插入链接,edui-upload-video是上传视频
- 我的微信
- 这是我的微信扫一扫
-
- 我的微信公众号
- 我的微信公众号扫一扫
-