soccerloway / quill-better-table

Module for better table in Quill, more useful features are supported.
MIT License
313 stars 120 forks source link

Copying and pasting individual H1 tags will not work #30

Closed kagol closed 4 years ago

kagol commented 4 years ago

Copying and pasting individual H1 tags will not work, but when the H1 tag is copied and pasted with other tags, it is really good. This problem only appeared in Quill 2.0.0-dev.x, Quill 1.3.6 does not have this problem.

soccerloway commented 4 years ago

It's really a problem in Quill 2.0.0-dev.x. We better create an issue in quillJs official repo~ Maybe a PR~

soccerloway commented 4 years ago

I found it caused by the code in quilljs core/editor.js: image getHTML is called in onCopy, and the return html will be cached in clipboard. It looks like the author handles inline copying and multi-line copying separately, I haven't figured out what the purpose was. If I remove the if logic statement, copying and pasting individual h1 tag will work.

soccerloway commented 4 years ago

I have already create a new issue about this in quilljs repo. Copying and pasting individual H1 tags will not work, We could dicuss this problem there~

kagol commented 4 years ago

Thank you for your timely response and suggestion, which is very helpful to me.