参考链接:https://blog.yzncms.com/shows/20/96.html

不能插入视频、iframe

2021/10/29后下载的代码的已经默认添加,无需修改
文件位置:public/static/libs/ueditor/ueditor.config.jswhitList

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

然后关闭百度编辑器标签过滤功能``

1
2
3
4
5
6
// xss 过滤是否开启,inserthtml等操作
,xssFilterRules: false
//input xss过滤
,inputXssFilter: false
//output xss过滤
,outputXssFilter: false

不能插入html,标签,class等会过滤

百度编辑器默认插入html,会对一些标签,class等做过滤,简单粗暴直接关闭编辑器默认的过滤转换机制即可

查找 UE.plugins.defaultfilter=function(){ 在后面加return;即可

img

最后

请使用CTRL+F5深度刷新js,避免缓存