Support

Account

Home Forums Gutenberg Gutenberg Breaks Tags in Block's WYSIWYG Field Display

Unread

Gutenberg Breaks Tags in Block's WYSIWYG Field Display

  • I have a fairly simple block with two fields, one of with is a WYSIWYG field for a headline superimposed over a Vimeo. The headline just needs to be able to display text with the strong tag.

    The text displays properly in the block editor and the edit preview (see below). The block (for the most part) properly renders on the page except for the WYSIWYG text field, which is just printed to the page in a very vanilla manner:

    print get_field('hero_image_text') . "\r\n";

    But instead of just printing the contents of the field, it appears that autop is applied so the source ends up looking like this:

    <p><strong>Invention has the power< /strong> to </strong><strong>improve lives< /strong></strong></p>

    instead of the contents of the field:

    <strong>Invention has the power</strong> to <strong>improve lives</strong>

    Did I miss a step somewhere?

    Using WP 5.2.4

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.