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

Conversion drops whitespaces #30

Open
SaschaAusUlm opened this issue Apr 12, 2022 · 1 comment
Open

Conversion drops whitespaces #30

SaschaAusUlm opened this issue Apr 12, 2022 · 1 comment

Comments

@SaschaAusUlm
Copy link

Hi!

We are starting to use the library but encountered an issue.

Our users create/edit text using TipTap. It is a simple editor that allows them to create text with some easy HTML tags just by typing/selecting/formatting it.

Now, they might create text like:

"... that shows our <strong>company </strong>values."

Please notice the whitespace between "company" and the closing </strong> tag. That can easily happen in the TipTap editor and it's not obvious.

The AdaptiveHtml.toJSON() method converts this into:

"... that shows our **company**values."

because the whitespace is dropped. But should it be dropped?

@rcasto
Copy link
Owner

rcasto commented Mar 12, 2023

Seeing this late, but a simple way to resolve this is by putting the space after the <strong>...</strong> tag instead of within 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

2 participants