quill
quill copied to clipboard
Cannot paste text in Chrome. Firefox works fine.
I'm trying to paste any random text into the [email protected] editor, but all of my paste events are pretty much ignored in Chrome. Firefox works fine.
Steps for Reproduction
Step 1. Code.
<div ref="editorElement" class="ql-editor" contenteditable="true"></div>
import Quill from 'quill';
@customElement('quill-editor')
export class QuillEditorComponent {
@bindable({ defaultBindingMode: bindingMode.twoWay }) value: string;
editorElement: any;
editor: Quill;
attached() {
var toolbarOptions = [/* removed for brevity */];
this.editor = new Quill(this.editorElement, {
debug: true,
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: false
}
},
placeholder: 'I have something to say...',
theme: 'snow'
});
this.editor.root.innerHTML = this.value;
}
}
Step 2. Copy any text, such as "To get started, check out https://quilljs.com/ for documentation, guides, and live demos!"
Step 3. Paste into quill in Chrome.
Expected behavior:
Works in Firefox: text is copied to the editor from the clipboard.
Actual behavior:
Doesn't work in Chrome/Chromium. Upon paste, the editor loses focus and nothing is copied to the editor from the clipboard.
quill:clipboard convert Delta {
"ops": []
}
Platforms:
Chromium: Version 96.0.4664.110 (Official Build) snap (64-bit) Firefox: 95.0.2 (64-bit)
Version:
1.3.7
I am experiencing a similar bug on Brave (Chromium-based) but not Firefox. This seems like the death knell for this project because every user expects paste to work and the vast majority of the internet uses a Chromium-based browser. By the fact that this issue hasn't been replied to in 1.5 years, should I conclude that Quill is dead? That would be a real shame, because it has several excellent features that I was hoping to use, all based on its unique Delta setup under the hood.