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

BUG: Whitespace handling in inline elements #5724

Open
2 tasks done
bernesto opened this issue Mar 8, 2024 · 0 comments
Open
2 tasks done

BUG: Whitespace handling in inline elements #5724

bernesto opened this issue Mar 8, 2024 · 0 comments

Comments

@bernesto
Copy link
Contributor

bernesto commented Mar 8, 2024

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome v122

Reproducible demo link

https://jsfiddle.net/zwo0mdqf/5/

Describe the bug

How to reproduce the bug?

  1. Create valid inline block elements such as span, b, i, em, etc. that use multiple space, tab(s), or line breaks as word separators.

What is the expected behavior?
These elements when rendered should be spaced apart by one space. HTML export whitespace should respect input whitespace.

What is the current behavior?
These elements are rendered in the editor as separate components, but appear as one word. Output html is stripped of input whitespace. Note: Component HTML is exported on new lines per element, so displayed output does render correctly, but getHtml() does not.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bernesto bernesto changed the title BUG: Whitespace handling in text elements BUG: Whitespace handling in inline elements Mar 8, 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