When pasting text within or between a Quill editor, <strong> tags are stripped out IF the app's SCSS defines a font-weight for <strong> tags.
Example below. Steps to reproduce:
Note that in app.scss, strong tags are given a font-weight of 500.
In the editor do the following:
Enter some text and make it bold. Note that the text turns semibold.
Cut and paste it back into the editor. Note that the bold is removed. If you inspect the editor, you'll see that the <strong> tags were removed on paste.
In app.scss, remove the font-weight styling.
Make some text bold again. Note that the text turns default bold.
Cut and paste the text back into the editor. Note that the bold styling pastes successfully.
[ x ] I have verified that the issue persists under ReactQuill v2.0.0-beta.2
[ ] I can't use the beta version for other reasons
ReactQuill version
[ ] master
[ x ] v2.0.0-beta.2
[ ] v2.0.0-beta.1
[ ] 1.3.5
[ ] 1.3.4 or older
[ ] Other (fork)
FAQ
Is this a bug in Quill or ReactQuill?
ReactQuill is just a ~thin~ wrapper on top of the Quill editor. Often, what looks like a bug in ReactQuill, is actually a bug in the Quill editor itself. Before opening a ticket, please check the [Quill documentation], and the [issues page], and see if that answers your question first.
When pasting text within or between a Quill editor,
<strong>
tags are stripped out IF the app's SCSS defines a font-weight for<strong>
tags.Example below. Steps to reproduce:
<strong>
tags were removed on paste.[template]: Link to codesandbox showing the issue
Ticket due diligence
v2.0.0-beta.2
ReactQuill version
FAQ
Is this a bug in Quill or ReactQuill?
ReactQuill is just a ~thin~ wrapper on top of the Quill editor. Often, what looks like a bug in ReactQuill, is actually a bug in the Quill editor itself. Before opening a ticket, please check the [Quill documentation], and the [issues page], and see if that answers your question first.
[Quill documentation]: https://quilljs.com/docs
[issues page]: https://github.com/quilljs/quill/issues
How do I access the wrapped Quill instance?
See the [instance methods] and [API] documentation.
[instance methods]: https://github.com/zenoamaro/react-quill#methods
[API]: https://github.com/zenoamaro/react-quill#api-reference