You are viewing the v1 Nacelle Docs for existing merchants.New merchants can find the V2 docs here:

# Embed Content Types within rich text in Contentful

When using either @contentful/rich-text-html-renderer (opens new window) or @contentful/rich-text-react-renderer (opens new window) to render your rich text, you can add options to the function in order to handle specific cases:

documentToHtmlString(document, options)


documentToReactComponents(document, options)

Here is an example of how the options variable should look in order to access fields from embedded content types:

let options = {
  renderNode: {
    [BLOCKS.EMBEDDED_ENTRY]: (node) => {
      const { image, caption } =
      return `
            <img class="img-fluid" src="${image.fields.file.url}" alt="${altText}" />
            <p class="blog-post-caption">${caption}

In this example, the content type is always one with an image and a caption field.

You can access all the data of that content type by using, then you can use it as you like and render it in html