Support

Account

Home Forums Gutenberg Gutenberg comments in WYSIWYG are wrapped in paragraphs

Solved

Gutenberg comments in WYSIWYG are wrapped in paragraphs

  • I’m using:
    – WP 5.0.2
    – ACF Pro 5.7.9
    – Classic Editor 1.3 to force use of classic editor

    I’m planning to switch to proper use of the new Block Editor in the coming months, but for some current projects I’m still using the classic editor. I’m using a flexible content field as a simple page builder, with some layouts containing WYSIWYG fields. WordPress automatically adds comments such as <!-- wp:paragraph --> to these fields on account of the new Block Editor (which isn’t in use, but the comments are still added). I wouldn’t mind this on its own, but these comments are wrapped in paragraph tags on the frond-end. I’m calling the WYSIWYG fields simply with get_sub_field('field-name') – no filtering or processing on my end.

    Is anyone else experiencing annoying empty paragraphs (well, empty other than an HTML comment) like this as well? Anything I’m doing wrong? Will ACF 5.8 address this? Help appreciated, and if you need more info let me know.

  • The question is, how did these comments get put into an ACF WYSIWYG field. From what I understand they should only be added to the (now) standard WP editor.

  • Thank you for the reply John. It got me thinking, and it turns out the block editor comments were just leftovers from testing the new editor experience before switching to the old and copying some content over to other fields. I assumed these comments were incorrectly being added to all WYSIWYG fields, but it was just me.

    Good to know, false alarm, topic solved.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Gutenberg comments in WYSIWYG are wrapped in paragraphs’ is closed to new replies.