Skip Navigation

[Resolved] Editing Post Body with Front End Form loses Paragraphs

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by neilR 3 years, 5 months ago.

Author
Posts
#1839193

I have a CPT with a content template created in Block Editor. In that CPT, I am displaying the post body with a Fields and Text block with the Post Body inserted.

BACK END: If I edit the CPT in classic editor in the back-end, then Paragraph markers are lost in the Post Body. If I edit it in the Block Editor in the back-end, paragraph markers are retained. I understand that, if the Content Template uses the Block Editor, then the Custom Post must be edited using the block editor. Fair enough.

FRONT END: I have a front-end form to edit the content, which was written in the HTML editor, but when using this, paragraph markers are lost.

What settings do I change so that Post Body retains its paragraph markers when submitted by this form?

#1839523

Further info. When inspecting the html on the front-end, for CPT posts created in block editor in the back-end, paragraphs are defined with
<!-- wp:paragraph -->
<!-- /wp:paragraph -->
...and when these are edited in the visual editor on the front end form, the paragraphs are lost.
So.... that suggests that you can't create a post in the block editor in the back-end, if you intend to have its body edited in a front-end form. Is that correct?

#1839621

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Neil

I would expect you to use the Single Field block to insert the post body into your content template rather than the Fields and Text block, but—in any case—the current stable release doesn't handle paragraph breaks properly.

But that has been fixed in the current dev cycle, and the plugin updates should be out within a week or so, I'm not sure exactly when.

So that should resolve your problem.

Note, though, that front-end forms don't support the block editor. If you publish posts with a front-end form the content will use the traditional tinyMCE editor, and if you edit posts it will use the same.

Publishing posts in the backend with the block editor and then editing them in the front-end with Toolset Forms isn't a workflow that is currently supported.

#1839689

Hi Nigel,
Thank you for your reply, which has confirmed my understanding. As you can probably tell, I'm still feeling my way through using Toolset with Blocks rather than Classic, and boundaries like this are where the questions arise.
The Fields and Text Block was an attempt to apply a solution suggested for a different (but apparently similar) problem in the support database - I'll change it back to the single field.
Thanks for your clear explanation.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.