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 does not preserve bold text when pasted from itself #306

Closed
wallylawless opened this issue Mar 14, 2015 · 7 comments
Closed

Editor does not preserve bold text when pasted from itself #306

wallylawless opened this issue Mar 14, 2015 · 7 comments

Comments

@wallylawless
Copy link

If I copy text containing some bolded content from a Quill editor and then paste it back, the bold formatting is lost in the result. Italics, underlines, links etc. seem to be preserved properly.

This can be replicated by the following steps:

  • go to http://quilljs.com/
  • in the example editor on the page, bold some words (either by keyboard shortcut or toolbar, doesn't matter)
  • select all the content in the editor and copy it and then hit backspace to clear the editor
  • paste back into the editor, the bolded words will be rendered as regular text
@jhchen
Copy link
Member

jhchen commented Mar 17, 2015

Thank you for the report. Looks like something recent in webkit changed paste behavior to use a font-weight style instead of copying the <b> tag.

@wallylawless
Copy link
Author

If there's anything more I can do to help just let me know.

On Tue, Mar 17, 2015 at 3:50 PM, Jason Chen notifications@github.com
wrote:

Thank you for the report. Looks like something recent in webkit changed paste behavior to use a font-weight style instead of copying the tag.

Reply to this email directly or view it on GitHub:
#306 (comment)

@ivan-i
Copy link
Contributor

ivan-i commented Oct 23, 2015

This fix seems to be lost, the critical or node.style.fontWeight > 500 is missing. Merge conflicts? The issue is not fixed.

It is a very annoying bug for all Chrome/Safari users who use Quill-powered interfaces everyday. The fix is very simple, just add a check for > 500 in addition to bold check.

jhchen pushed a commit that referenced this issue Nov 10, 2015
@aadamsx
Copy link

aadamsx commented Nov 11, 2015

I'm seeing the same thing in 0.20.0.

@jhchen
Copy link
Member

jhchen commented Nov 11, 2015

The fix is live in 0.20.1.

@adam-horvath
Copy link

This issue is still/again reproducible in 1.3.7.

@vinay2042
Copy link

This issue is still reproducible in 1.3.7

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

6 participants