织梦更换ueditor文本编辑器后,无法插入第三方视频地址解决方法

  其实问题出在ueditor的过滤规则上面,xssFilter导致插入视频异常,编辑器在切换源码的过程中过滤掉img的_url属性(用来存储视频url)_src/plugins/video.js里处理的是_url,而不是_src。

1、在配置文件ueditor.config.js中,定位 //xss过滤白名单,即,whitList:{ },对 img: 增加 “_url” 属性: 

 2、在 video 标签后新增3给标签,使Ueditor分别能支持embed标签和iframe标签: 

 以下为插入代码:

1 source: ['src', 'type'],
2  embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play',  
3       +  'autoplay','loop', 'menu', 'allowscriptaccess', 'allowfullscreen', 'controls', 'preload'],
4  iframe: ['src', 'class', 'height', 'width', 'max-width', 'max-height', 'align', 'frameborder', 'allowfullscreen']

完成后注意重启你的环境,然后在合适的视频中选择嵌入代码,复制到你的ueditor编辑器中,会发现问题解决了。

原文地址:https://www.cnblogs.com/zw0718/p/12787578.html