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?
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?
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.
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.