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

All spaces converted to   in quill-editor #4535

Open
byvernault opened this issue Dec 17, 2024 · 9 comments
Open

All spaces converted to   in quill-editor #4535

byvernault opened this issue Dec 17, 2024 · 9 comments

Comments

@byvernault
Copy link

byvernault commented Dec 17, 2024

We are using quill-editor in our application to create a resume. Since all spaces are converted to   (non breaking space), the printable version created by LateX is broken (line doesn't break at the right space).

Reverting to 2.0.2 works.

Steps for Reproduction

  1. Use quill-editor in an application (angular) with the version 2.0.3
  2. Enter a string with spaces
  3. Verify the value of the input (all spaces are converted to  )

Expected behavior:

Input: This is a test
Output: This is a test

Actual behavior:

Input: This is a test
Output: This&nbps;is&nbps;a&nbps;test

Platforms:

Angular application running on latest browser (tried safari, chrome, chromium, firefox)

Version:

The issue is located in this commit : 07b68c9 where you can see line 374 :

return escapedText.replaceAll(' ', ' ');

@Sergiobop
Copy link

Duplicated of #4509

@trymeouteh
Copy link

Would like to see this fixed as well

@helen-andronova
Copy link

Any updates?

@mwijnands
Copy link

mwijnands commented Feb 19, 2025

We are reverting to 2.0.2 because this breaks our use cases. I can't imagine anyone wanting this change.

@vkoves
Copy link

vkoves commented Feb 21, 2025

Glad someone else saw this - we're upgrading from Quill 1 to 2 and I saw this and was very confused. At least there's a minor version back that doesn't have the issue 🙃

In our own codebase we do HTML validation where we confirm certain behaviors end up creating a certain HTML - I wonder if Quill needs something like that

@alexis-delaunay
Copy link

We reverted to v 2.0.2 to fix this issue.
Will this be fixed?

@64jcl
Copy link

64jcl commented Mar 21, 2025

Could this be something they added as Quill zaps all multiple spaces otherwise in v2.0.2? We have an issue where if you have two tags within each other, for example <em><var ...></var></em> - if the user presses space after this the spaces are added between the </var> and </em> and although they are retained and posted to our server correctly as well as being the actual value in the textarea from which quill is initialized from, it will remove those spaces because it considers them not needed. This causes words to be glued together. My thought about a fix for this is to convert these to &nbsp; - but perhaps they already did this and I need to upgrade to a new version.

EDIT: Whoa! I just upgraded to 2.0.3 and while this actually fixed our problem I see it introduced another where the text will no longer break if being rendered! &nbsp; does not have the same behaviour as a space with regards to normal word wrapping.

@caiovrodrigues
Copy link

you can just add word-break: break-all; in tag.
So It will break line even with &nbsp;

@teolag
Copy link

teolag commented Apr 9, 2025

Just updated and have to revert back again. This breaks the layout on a lot of pages. Sure this can be averted by word-break: break-all, but bad work arounds tend to break other stuff. Not worth it.

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

10 participants