|
@@ -149,6 +149,19 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+ //配置 自定义处理粘贴的文本内容
|
|
|
+ this.editor.config.pasteTextHandle = function (content) {
|
|
|
+ if (content == '' && !content) return ''
|
|
|
+ var str = content
|
|
|
+ str = str.replace(/<xml>[\s\S]*?<\/xml>/ig, '')
|
|
|
+ str = str.replace(/<style>[\s\S]*?<\/style>/ig, '')
|
|
|
+ str = str.replace(/<\/?[^>]*>/g, '')
|
|
|
+ str = str.replace(/[ | ]*\n/g, '\n')
|
|
|
+ str = str.replace(/ /ig, '')
|
|
|
+ // console.log('****', content)
|
|
|
+ // console.log('****', str)
|
|
|
+ return str
|
|
|
+ };
|
|
|
this.editor.config.onchange = (html) => {
|
|
|
this.info_ = html; // 绑定当前逐渐地值
|
|
|
this.$emit("change", this.info_); // 将内容同步到父组件中
|