It seems like when a new instance of quill-editor is created it triggers an event on the clipboard.
This behavior doesn't happen in the original version of quilljs. I looked into the code and seems like you're using pasteHTML to insert the initial value, which makes it trigger the clipboard.
Context: On my application I'm listening for content that is pasted into the editor so I can clean up the content being pasted, the problem is that every time a new instance of quill-editor is created, it triggers a clipboard event.
Here's a code example:
/// this should be triggered ONLY when a new text is pasted from the clipboard.
quill.clipboard.addMatcher(Node.ELEMENT_NODE, (node, delta) => {
return new Delta().insert(node.textContent);
});
It seems like when a new instance of quill-editor is created it triggers an event on the clipboard. This behavior doesn't happen in the original version of quilljs. I looked into the code and seems like you're using pasteHTML to insert the initial value, which makes it trigger the clipboard.
Context: On my application I'm listening for content that is pasted into the editor so I can clean up the content being pasted, the problem is that every time a new instance of quill-editor is created, it triggers a clipboard event.
Here's a code example: