修复富文本编辑器xss过滤样式问题

master
paulGao 2022-01-17 16:49:55 +08:00
parent d2aca24d06
commit cf740d9605
2 changed files with 3 additions and 10 deletions

View File

@ -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);

View File

@ -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);
};