在module的粘贴板里添加一个匹配器
modules: {toolbar: false,clipboard: {// 粘贴过滤matchers: [[Node.ELEMENT_NODE, this.HandleCustomMatcher]]// ['img', this.HandleCustomMatcher2]},},
let ops = []Delta.ops.forEach(op => {if (op.insert && typeof op.insert === 'string') {ops.push({insert: op.insert,})} else {// this.$message({// message: '不允许粘贴图片',// type: 'warning'// })}})Delta.ops = opsreturn Delta