我正在使用羽毛笔编辑器,它工作正常,但问题是在粘贴包含图像的文本时,它也将它粘贴到我不想要的文本区域中。我怎么能禁用它?我尝试了以下链接中给出的格式选项,但没有用。 https://github.com/quilljs/quill/issues/1108 以下是html
<quill-editor #textArea [placeholder]="attribute.name"
[formControl]="specsForm.controls[attribute.id].controls.value" [required]="attribute.isRequired"
[readOnly]="isProductAttributeDefected || attribute.isReadOnly " [disableControl]="isProductAttributeDefected || attribute.isReadOnly"
[maxLength]="attribute.maxLength" [modules]="editorConfig" (onEditorCreated)="editorInit($event, attribute.id, specsForm, false)">
这是我在 ts 中的配置
public editorConfig: {
modules: {
toolbar: [
[{ header: [1, 2, false] }],
['bold', 'italic', 'underline'],
['code-block']
]
},
placeholder: 'Compose an epic...',
theme: 'snow', // or 'bubble'
formats: [
'background',
'bold',
'color',
'font',
'code',
'italic',
'link',
'size',
'strike',
'script',
'underline',
'blockquote',
'header',
'indent',
'list',
'align',
'direction',
'code-block',
'formula'
// 'image'
// 'video'
]
};
我尝试了 5.2.0 和 6.2.0 版本
任何想法?注意:给定链接上提到了一个黑客,但我想有一个适当的解决方案