Using the API to send Rich Text into CMS. How to keep the bullets?

Hi guys!

I am trying to send data from Airtable to Webflow using Integromat. I want to display text in a rich text element that is binded to a CMS.

I’ve had no problem sending and receiveng the data but I can’t make it display the bullets…

So far I’ve tried:

  1. Using a long text field in Airtable.
  2. Using a rich text field in Airtable.
  3. Adding double spaces in texts in Airtable.
  4. Using \n .

Any ideas on how can I send the data to my CMS and keep the bullets?

Thanks!

Something funny (see attached): as soon as I “save” the CMS item -even without modifying-, it works :thinking:.

2020-06-03_15h06_45

2 Likes

I am having the same issue. Did you find any work around to this?

I did! You can take a look at this: https://twitter.com/heymicahh/status/1306291136131031041.

Good luck!

1 Like

This Twitter thread was a life saver! For others reference, here is a working implementation (working for me) in JavaScript.

I used the showdown library to convert Markdown to HTML, though any tool should work.

const showdown = require('showdown');

/**
 * Converts the markdown to html. Webflow has known issue with parsing lists
 * based on the markdown library they use. This is a workaround to convert
 * the markdown to html, thing stringify it in a JSON object, the parse it,
 * before sending it to the Webflow API.
 */
function convertMarkdownToRtf(markdown) {
    const converter = new showdown.Converter();
    /**
     * Make object to stringify with rtf as the value. Replace
     * new lines with empty string to circumvent parsing issues.
     */
    const htmlString = JSON.stringify({
        text: converter.makeHtml(markdown).replace(/\n/g, ''),
    })
    /* Parse the stringified object to get the string value. */
    return JSON.parse(htmlString).text;
}

The returned text, when submitted to the Webflow CMS API for an Item’s RTF field, will render out lists properly.

Aaaand now 3 years later I’m having this problem, but pushing from Notion.

Worked fine using Webflow’s plain text fields for a while and now all the sudden theres some glitch where half of them hold line breaks and the other half doesn’t. (Breaking set properly in Designer) There are even a few that hold half the line breaks but not all of them :joy: And if I connect the Designer text box to a working one, it works. Connect that same Designer text box to one that doesn’t work, and it doesn’t work.

So frustrating. They even just released a new module but I just tried to send text to a rich text field and it created the CMS entry but left the RTF empty. Make/Integromat didn’t even flag an error.

I added an request to the Wishlist. Please vote for it: Add Support for RichText List Items via API | Webflow Wishlist

1 Like

I did this in zapier and it worked


Based off this: x.com