Quill 2.0 clipboard matcher issue
When paste plain text, clipboard matchers are not applied. because of this line
https://github.com/quilljs/quill/blob/develop/modules/clipboard.js#L87 new quill just interrupts converting delta
I believe need to apply all textMatchers in this case
Steps for Reproduction
- visit https://codepen.io/volser/pen/pMxBOX
- Paste text from plain text editor
https://recordit.co/nOvfaaJpKF
Expected behavior: Clipboard handler should be called
Actual behavior: Was not called
Platforms: Windows, Chrome
Version: "2.0.0-dev.2"
@jhchen added description as you wanted
Confirming I've come up against this too.
These lines are a short-circuit of the matcher functionality for text that doesn't include HTML:
The following line calls convertHTML which in turn calls traverse which actually applies the matchers
This is easily reproduced by:
- copying plain text from a text editor / browser console and pasting (no matchers fired)
- copying any text from a website or out of the quill editor itself and pasting (matchers fired)
The text copied from an html source will at minimum include a <meta charset> tag whereas plaintext does not, see the difference below (first result plaintext, second copied from html source)
Still appears to be a regression, even in the latest 2.0.0-dev.4.