Custom Fields
Re-Envisioned
Support MB Views Lost tag in wysiwyg field in “views”

  • Creator
    Topic
  • #28129
    Erik
    Participant

    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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Author
    Replies
  • #28141
    Long Nguyen
    Moderator

    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

    #28184
    Erik
    Participant

    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

    #28204
    Long Nguyen
    Moderator

    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.

    #28207
    Erik
    Participant

    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

    #28215
    Long Nguyen
    Moderator

    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.

    #28219
    Erik
    Participant

    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

    #28221
    Long Nguyen
    Moderator

    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.

    #28237
    Long Nguyen
    Moderator

    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.

    #28238
    Erik
    Participant

    Hi Long,
    Thanks for your report. I am in noway situation with this 🙁
    Hoping that the dev team resolves this quickly
    Best regards
    Erik

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.