修改富文本禁止粘贴

This commit is contained in:
范强强
2022-09-09 11:41:28 +08:00
parent 126e694ec2
commit 660c8f426c
@@ -236,7 +236,7 @@
modules: {
clipboard: {
// 粘贴版,处理粘贴时候带图片
matchers: [[Node.ELEMENT_NODE, this.handleCustomMatcher]]
matchers: [[Node.ELEMENT_NODE, this.handleCustomMatcher]],
},
toolbar: {
container: toolbarOptions, // 工具栏
@@ -347,7 +347,7 @@
Delta.ops.forEach(op => {
if (op.insert && typeof op.insert === 'string') {// 如果粘贴了图片,这里会是一个对象,如果是字符串则可以添加
ops.push({
insert: op.insert
insert: op.insert,
})
}
})
@@ -461,7 +461,7 @@
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
quill.insertEmbed(length, 'image', window._CONFIG['domianPreviewURL'] + '/sys/common/download/' + file.response.result.id + fileSuffix)
quill.insertEmbed(length, 'image', window._CONFIG['domianPreviewURL']+'/sys/common/download/'+file.response.result.id+fileSuffix)
quill.setSelection(length + 1)
this.quillUpdateImg = false
} else if (status === 'uploading') {