Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quill 2.0 clipboard matcher issue #2706

Open
volser opened this issue Jul 31, 2019 · 5 comments
Open

Quill 2.0 clipboard matcher issue #2706

volser opened this issue Jul 31, 2019 · 5 comments

Comments

@volser
Copy link

volser commented Jul 31, 2019

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

  1. visit https://codepen.io/volser/pen/pMxBOX
  2. 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"

@volser volser changed the title Quill .20 clipboard matcher issue Quill 2.0 clipboard matcher issue Jul 31, 2019
@volser volser mentioned this issue Jul 31, 2019
@volser
Copy link
Author

volser commented Aug 12, 2019

@jhchen added description as you wanted

@bradbarrow
Copy link

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)

image

@gordoncl
Copy link

gordoncl commented Mar 15, 2022

Still appears to be a regression, even in the latest 2.0.0-dev.4.

@omgoshjosh
Copy link

well i guess my journey ends here for now: visualjerk/quill-magic-url#94 (comment)

@omgoshjosh
Copy link

there's also this comment which should probably be broadcast more widely: #4002 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants