Is there a way to remove the <P> tag in the editor?

Shaun__Scholtz
Shopify Partner
1 0 0

Even using the html editor, it keeps adding the <p> tag automatically. Is there anyway to remove it?

0 Likes
Ewa2
Shopify Staff
Shopify Staff
135 0 40

Hi Shaun,

Ewa here - I'm one of the Gurus at Shopify. I checked with our design team and there isn't a way to prevent the automatic <p>  tag. 

If there is anything else - just let me know - I'm here to help :)

Thanks,

Ewa
Shopify Guru | ewa@shopify.com

0 Likes
Jason
Shopify Expert
10402 163 2046

What do you need to remove the paragraph tag for? 

In most cases a CSS rule could stop it having any effect on your site. If it really, really had to be removed you could do it via Liquid. It won't fix the fact that the editor is adding it, but at least you can still remove them...

{% capture a_chunk_of_supa_dupa_content %}
<p>Supa!</p>
{% endcapture %}

{{ a_chunk_of_supa_dupa_content  | remove: '<p>'  | remove: '</p>' }}

 

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
serge512
New Member
1 0 0

Nice one! helped me a lot i needed to add a br for each <p> in the field so i had to go with split

{% assign paragrafs = settings.text | remove: '<p>' | split: '</p>' %}
{%- for paragraf in paragrafs -%}
    {%- if paragraf != blank or paragraf != '' -%}
        {{ paragraf }}
        {%- if forloop.last == false -%}
            <br/>
        {%- endif -%}
    {%- endif -%}
{%- endfor -%}

 

0 Likes