Issue #476Opened November 1, 2017by Geczy0 reactions

Spans are stripped - unwanted behavior

Question

For example if I import <p><span style="font-size:50px;">hi</span></p> via grapesjs import command, the following is set as the component: <p data-highlightable="1">hi</p>. Losing my styles

Answers (3)

GeczyNovember 1, 20170 reactions

In my case it is preferable to not strip the <span> and leave it in the HTML. Why was it removed?

Be careful of things like:

<p style="font-size:12px;"><span style="font-size:50px;">hi</span> hey</p>

What should the expected output be after the parser?

Hi should be 50px, hey should be 12px. This is why the html parser should not remove spans

artfNovember 2, 20170 reactions

I agree with you Matt, indeed, as already mentioned, I'd like to remove it but need to find time to test it, to be sure it's not breaking other stuff. I close this in favor of #341

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.