Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Bobby Bosler

Line breaks in ACF WYSIWYG field not displaying in inline edit

Hello,

I’ve discovered that in the inline edit popup for an ACF WYSIWYG field, the line breaks are not displaying. I’m not speaking of <p> tags, but actual line breaks.

Here’s my application. I’ve got a gravity form that allows me to update a custom ACF field through a front-end form. It works properly, and the resulting content displays perfect in the edit post screen and the front end, but not on the All Posts screen using ACP’s inline edit. That’s my primary place of proofing the content that is submitted (listener-submitted transcripts for podcast episodes), so it is most important to be able to view them with the line breaks in place.

See the following screenshots to illustrate this discrepancy.

Screenshot of ACF WYSIWYG field in the inline edit screen
Screenshot of ACF WYSIWYG field in the inline edit screen

The same ACF field in the post edit screen, controlled by ACF
The same ACF field in the post edit screen, controlled by ACF

Display of content on the front end
Display of content on the front end

10 months, 3 weeks ago
Stefan van den Dungen Gronovius
Developer

Thanks for your feedback.
We will fix this in the next update.
You can already change this behavior with the following snippet/hook

add_filter('acp/editing/value', function ($value, $id, AC\Column $column) {
    if ($value && $column instanceof ACA\ACF\Column && $column->get_field() instanceof ACA\ACF\Field\Type\Wysiwyg) {
        return wpautop($value);
    }

    return $value;
}, 10, 3);
10 months, 3 weeks ago
Bobby Bosler

Awesome. Thanks so much!!

10 months, 3 weeks ago
Bobby Bosler

And, for the record, works like a charm!

10 months, 3 weeks ago

You must be logged in to reply to this topic.