修复富文本编辑器xss过滤样式问题
parent
d2aca24d06
commit
cf740d9605
|
@ -78,11 +78,7 @@ export default {
|
|||
editor = new E(`#${this.id}`);
|
||||
// 编辑内容绑定数据
|
||||
editor.config.onchange = (html) => {
|
||||
if (this.openXss) {
|
||||
this.data = xss(html);
|
||||
} else {
|
||||
this.data = html;
|
||||
}
|
||||
this.data = html;
|
||||
this.$emit("input", this.data);
|
||||
this.$emit("on-change", this.data);
|
||||
};
|
||||
|
@ -166,6 +162,7 @@ export default {
|
|||
},
|
||||
// 保存
|
||||
editHTMLOk() {
|
||||
console.log(this.dataEdit);
|
||||
editor.txt.html(this.dataEdit);
|
||||
this.$emit("input", this.data);
|
||||
this.$emit("on-change", this.data);
|
||||
|
|
|
@ -76,11 +76,7 @@ export default {
|
|||
this.editor = new E(`#${this.eid}`);
|
||||
// 编辑内容绑定数据
|
||||
this.editor.config.onchange = (html) => {
|
||||
if (this.openXss) {
|
||||
this.data = xss(html);
|
||||
} else {
|
||||
this.data = html;
|
||||
}
|
||||
this.data = html;
|
||||
this.$emit("input", this.data);
|
||||
this.$emit("on-change", this.data);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue