Consecutive spans render whitespace differently in grapes' editor than in ordinary window
Yeah Tom thanks, I think a configurable option (eg. keepWhitespace?!?) might be a good solution
Read full answer below βQuestion
I've spent the greater part of an afternoon trying to debug this. While I have reduced this to a small and easy to reproduce test case, I didn't find the root cause of this issue yet. Hopefully someone can help. Note the following HTML template: If you render this in a browser, it renders as: <img width="133" alt="screen shot 2018-03-29 at 1 36 34 pm" src="https://user-images.githubusercontent.com/331833/38112278-47c661fe-3356-11e8-8186-d48791b01af7.png"> Notice the whitespace between "Our solution" and "About". If you then use the exact HTML and style as Grapes's template, it will render as:...
Answers (3)
Yeah Tom thanks, I think a configurable option (eg. keepWhitespace?!?) might be a good solution
This is due to the node cleaning while traversing https://github.com/artf/grapesjs/blob/dev/src/parser/model/ParserHtml.js#L155-L158
Thanks @artf, I see. I would suggest removing this or at least making this configurable (defaulting to true then to prevent breaking changes). Would you accept a PR for this?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1699
Link elements are not copyable/deletable
In the editor, if we have link element with some classes, the editor does not allow to copy/delete the element. GrapesJS version: v0.14.50S...
Issue #1980
RTE Editor not scrolling
The Toolbar of the RTE Editor is not visible vor Text field higher than the Browserwindow. While scrolling to the middle the RTE Toolbar is...
Issue #1865
Grapes change page position
Hello, I found the following problem using grapes inside an html page: when you click on some elements of the editor, such as the arrow to...
Issue #708
Greapes editor cannot read "template" tag
When I try to save following html to grapes editor, its not able to render "template" tag. Regards
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins βPremium plugins ship with support, regular updates, and production-ready features β save days of integration work.
Browse premium plugins βRelated tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.