Contentful logo

Contentful Community

Is there a way to generate contentful rich text on a web page?

Contenful has their own [rich text format][1] in a json style form:

{
  "nodeType": "document",
  "data": {},
  "content": [
    {
      "nodeType": "paragraph", // Can be paragraphs, images, lists, embedded entries
      "data": {},
      "content": [
        {
          "nodeType": "text",
          "value": "This text is ",
          "data": {},
          "marks": []
        },
        {
          "nodeType": "text",
          "value": "important",
          "data": {},
          "marks": [
            "type": "bold" // Can be bold, underline, italicss
          ]
        }
      ]
    }
  ]
}

Is there any way to generate this type of rich text besides in contenful?

I’d love to use other rich text editors like for example [vue-quill-editor][2]

enter image description here

But they generate html as an output, meaning there is no way for me to add the content to a contentful database in a meaningful way.

Interested in ideas on this.

Also posted a question on stackoverflow here:

Hi @jessekhorasanee ,

Contentful has a beta version of an HTML to Rich text converter:

However, be aware that is a beta version, and you will probably need some extra work to make it suitable for your use-case.

1 Like

Thank you! This is what I was looking for, but you are correct, it’s missing images and embedded video which I’ll need but am able to add myself