-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Bug]: Removing spaces between tags #4792
Comments
I'm getting the same problem. This is related to the changes made in #4767. |
At least some clue. |
@szymekjanaczek yes the problem is not seen in |
I am facing similar issue: #4822 |
Another example may be seen on the "Mention" extension page. <span data-type="mention" data-id="Winona Ryder"></span> <span data-type="mention" data-id="Axl Rose"></span> The HTML above is collapsed when parsed by the editor, but there is an empty space between these 2 mentions. |
This is also happening in the project I'm working on and its related to this commit (confirmed after a lot of time debugging tiptap) I guess its not checking the options set like (preserveWhitespace: true) |
Thanks for reporting. I was able to reproduce. Will be working on a fix. |
Hi, I am currently experiencing this same issue using version 2.4.0. When applying marks next to each other on the same line, the space is removed. |
@brendawon Are you still seeing this issue with 2.5.5 though? The fix landed in 2.5.0 I believe |
I updated to 2.5.5, but my problem still persists @nperez0111 I wonder if my issue is slightly different. When applying marks next to each other on the same line, there is a space in the Editor UI, but the space is removed from the html. For my purposes, I am saving the html and rendering it elsewhere, and the space is removed there. If I try to edit my saved content, the space does still remain in the Editor UI. ![]() As a workaround, I can apply marks including the space on either end, but it's not ideal from a UX perspective. |
sorry, appeared to be an issue with my HTML parser. fixing that + v2.5.5 is working for me! thanks |
I'm getting this issue with
|
Which packages did you experience the bug in?
core, react
What Tiptap version are you using?
2.1.16
What’s the bug you are facing?
Let's assume we write a text and format it like below:
When saving this somewhere and then recovering and load into tiptap again, getting text in this format:
Without space between
</em>
and<strong>
. So the words "dolor" and "sits" connects into one word "dolorsit".What browser are you using?
Chrome
Code example
codesandbox.io - React version
What did you expect to happen?
Reading the text as it has been previously written - with spaces between HTML tags.
So when I save
And then set it as a content of the TipTap editor, I want to keep original spaces - without gluing words together.
Anything to add? (optional)
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: