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

Editor removing <strong> tags on paste if there is a font-weight for <strong> tags defined in SCSS #992

Open
6 tasks
raytri opened this issue Jul 23, 2024 · 0 comments

Comments

@raytri
Copy link

raytri commented Jul 23, 2024

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:

  1. Note that in app.scss, strong tags are given a font-weight of 500.
  2. In the editor do the following:
  3. Enter some text and make it bold. Note that the text turns semibold.
  4. 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.
  5. In app.scss, remove the font-weight styling.
  6. Make some text bold again. Note that the text turns default bold.
  7. Cut and paste the text back into the editor. Note that the bold styling pastes successfully.

[template]:
Link to codesandbox showing the issue

Ticket due diligence

  • [ 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.

How do I access the wrapped Quill instance?

See the instance methods and API documentation.

@raytri raytri changed the title Editor removing <strong> tags on paste if there is a font-weight for <strong> tags defined in CSS Editor removing <strong> tags on paste if there is a font-weight for <strong> tags defined in SCSS Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant