浏览模式: 普通 | 列表
7月, 2024 | 1

ueditor 上传视频丢失src的解决方法

[ 2024-07-15 16:08:21 | 作者: admin ]
p.s. ueditor上传视频后,切换到html模式会发现video的src丢失了,这是因为配置白名单缺少html标签过滤了,需要加上html标签和相关属性。


修改 udeitor.config.js 的 白名单,可以搜索 whitList, 然后修改以下代码:
img: ['src', 'alt', 'title', 'width', 'height', 'id', '_src', 'loadingclass', 'class', 'data-latex','style','_url'],//加了style和_url
video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style','id'],//加了id


https://www.cnblogs.com/modou/p/7833785.html
1