Support Forum
Hi,
How can I keep the formatting of my wysiwyg field in “views”. It keeps the <h3> but all <p> tags are lost.
Thanks in advance
Hi Erik,
I do not see this issue on my end. Did you enable the setting Save data in the raw format
in the Builder? See more on the documentation https://docs.metabox.io/fields/wysiwyg/#settings
Hi,
I choose that option but it does nothing. Only the “h” tag is kept.
I saw on twig documentation that it comes with filter for text but when I declare that :
{{ clone.contenu|wpautop }}. It breaks my site 🙁
Thanks for your help
Hi Erik,
Checked that option means the editor does not save the <p>
tag that automatically applies when you hit enter to break the line. See on the documentation https://docs.metabox.io/fields/wysiwyg/#settings
If you want to save data in raw format, e.g. exactly the same as you enter in the editor without applying wpautop() function. Can be true or false (default). Optional.
So please uncheck the option Save data in the raw format
to save the <p>
tag.
Hi,
Thanks for your explanation, but there is still a problem. I make some screen capture
Thanks for your support
https://share.getcloudapp.com/KoudoneQ
Hi Erik,
So please share the full code that you are using to show the field value, I will try to reproduce the issue on my end.
Hi,
here is the code of the “views" :
<div class="accord-container">
{% for clone in post.rubrique %}
<button class="accordion">{{ clone.titre }}</button>
<div class="panel">
{{ clone.contenu }}
</div>
{% endfor %}
</div>
Thanks
Hi,
It looks like you have a cloneable group with subfields title and content. I've tried to reproduce these fields on my local site but still cannot see the issue. The <p>
tag displays on the frontend as well. Please share your site credentials via this contact form https://metabox.io/contact/, I will check it out.
Hi Erik,
Thank you for your additional information. I see that the WYSIWYG subfield in a cloneable group does not automatically add the <p>
tag when using the Classic editor. Please use the Block editor instead and re-create the content. I will escalate this case to the development team to check it.
Hi Long,
Thanks for your report. I am in noway situation with this 🙁
Hoping that the dev team resolves this quickly
Best regards
Erik