How to reformat text from Grist table to Webflow rich text field

Grist is a great online database tool for managing information in table format.

Moving text field as is via Webflow API from Grist table to Webflow CMS rich text field won’t automatically convert the ‘new line’ \n markers to Webflow compatible format → text becomes a single text block without empty lines in-between:

The correct formatting to create the paragraphs for the Webflow rich text field is HTML paragraph tagging <p></p>

One way to detect and fix the difference is to use API service to detect the new lines using regex replace module using the pattern \n\s*\n to find the new line markers in the text block.

And replace them by </p><p> marking (to generate the gap between ending and starting paragraph. And additionally adding also the starting <p> and ending </p> to the start and end of the whole modified text block, for example:


Fixed formatting works correctly via API created CMS item:


PS: Thrid > Third