Forum Academy Marketplace Showcase Pricing Features

Using json API to display Rich Text

I am using Contentful as a CMS for building my blog.

I have successfully set all APIs to get the data I am looking for, and so far I am having the only issue with the Rich Text format.

I need a text feature with some basic features such as underlined url, italic & bold, fonts, etc.

This is how I would like to see the the description:

But while trying to show it using a either text element or HTML, both are showing me quite naked results: (The first is a text element, the second one is HTML element).

Is it a big issue to fix it? I know zero about code and I all I was reading seem to be really complicated.emphasized text

Can you show the data you get from API?

Can you show the raw data?

{
"sys": {
    "space": {
        "sys": {
            "type": "Link",
            "linkType": "Space",
            "id": "sw4qwy3e7hhd"
        }
    },
    "id": "4EdwqmF67rxdt1yczD0n2j",
    "type": "Entry",
    "createdAt": "2019-09-05T00:08:36.335Z",
    "updatedAt": "2019-09-13T00:20:23.541Z",
    "environment": {
        "sys": {
            "id": "master",
            "type": "Link",
            "linkType": "Environment"
        }
    },
    "revision": 3,
    "contentType": {
        "sys": {
            "type": "Link",
            "linkType": "ContentType",
            "id": "blogPost"
        }
    },
    "locale": "en-US"
},
"fields": {
    "blogTitle": "IBM & JP Morgan in Global Blockchain Banking Market",
    "blogPublishedDate": "2019-09-21T00:00+03:00",
    "blogBody": {
        "data": {},
        "content": [
            {
                "data": {},
                "content": [
                    {
                        "data": {},
                        "marks": [],
                        "value": "Early this month, an official at China’s central bank said the bank is nearing the launch of its digital currency.",
                        "nodeType": "text"
                    }
                ],
                "nodeType": "paragraph"
            },
            {
                "data": {},
                "content": [
                    {
                        "data": {},
                        "marks": [],
                        "value": "\nBloomberg reported Monday August 12th that Mu Changchun, deputy director of payments unit at the People’s Bank of China (PBoC), said its team is close to completing the task of creating the systems needed to support a digital yuan offering.\n\nAlthough the PBoC’s project has been going for one year, recent news from Facebook has changed the motivation of the PBoC. In mid June of 2019 Facebook announced details of its ",
                        "nodeType": "text"
                    },
                    {
                        "data": {
                            "uri": "https://www.theblockcrypto.com/tiny/project-libra-facebook-to-launch-stablecoin-based-payments-network/"
                        },
                        "content": [
                            {
                                "data": {},
                                "marks": [],
                                "value": "Libra cryptocurrency project.",
                                "nodeType": "text"
                            }
                        ],
                        "nodeType": "hyperlink"
                    },
                    {
                        "data": {},
                        "marks": [],
                        "value": "\n\n",
                        "nodeType": "text"
                    }
                ],
                "nodeType": "paragraph"
            }
        ],
        "nodeType": "document"
    }
}

There’s nothing you can do because the API return just text a not html, bbcode or anything like this.

Thanks @Jici for your quick respond. I personally rely only on the community’s opinion at this stage as I am completely out of this knowledge of how to deliver a simple way of content.

It is quite important for me to stick the publishing structure using Bubble as a frame.

Is there anyone who has a creative solution or a loop hole for my case? I wouldn’t mind sponsoring this feature if it is under a realistic budget and if the rest of the community would find it useful.

Which API do you connect?

I’ve been using this GET:
https://cdn.contentful.com/spaces/sw4qwy3e7hhd/environments/master/entries/4EdwqmF67rxdt1yczD0n2j?access_token=bQcOOApcr-0aZDOmZmAMZsdRxGZV_wmB87PRknRJsyg

I might be choosing the wrong one?
I’ve found it over here:

https://www.contentful.com/developers/docs/references/

So there’s no solution for this?

@NigelG do you know how to solve this? I know you connected a blog to Contentful.

I have the same issue. I can’t get the rich text field from Contentful to display properly in Bubble.

Hi there.

I think I used a markdown to HTML converter.

Nigel.

@NigelG yeah I saw your old post about it. I can give that a try. Thanks.

Contenful has a rich text field option in their content model now so I was hoping I could call that without having to convert anything. The blog text is coming in but the formatting and images aren’t working.

https://www.contentful.com/developers/docs/concepts/rich-text/

Is there something about this API response that Bubble can’t handle?

bubble expression

@iliab did you ever figure this out?

No, that was not there when I used it.

There is probably something that renders JSON rich text … but I don’t think it is the same Rich Text that is in the Bubble element.

You can do it in node … so can probably write a server side plugin.

Or with some code on the page.