UEditor编辑器为了防止xss攻击,默认过滤了P标签的data-background属性,不能设置页面的背景样式。
解决方案:设置ueditor.config.js中的过滤规则,在P标签的属性中加入data-background,在获取html文本就包含了背景设置
图片浮动:UEditor中的过滤规则默认过滤掉了img标签的style属性。
解决方案:设置ueditor.config.js中的过滤规则,在img标签的属性中加入style,在获取html文本就包含了图片的浮动信息

UEditor编辑器为了防止xss攻击,默认过滤了P标签的data-background属性,不能设置页面的背景样式。
解决方案:设置ueditor.config.js中的过滤规则,在P标签的属性中加入data-background,在获取html文本就包含了背景设置
图片浮动:UEditor中的过滤规则默认过滤掉了img标签的style属性。
解决方案:设置ueditor.config.js中的过滤规则,在img标签的属性中加入style,在获取html文本就包含了图片的浮动信息
本文标题:百度UEditor设置背景和图片浮动
本文链接:https://www.haomeiwen.com/subject/wpoesftx.html
网友评论