Introduction
When Cloudpess exports content to a Contentful Long Text field, it converts it to markdown. This works for most scenarios, but sometimes, you want to include custom content that must be processed in a certain way by the markdown library on your website. For example, you might use MDX, which allows you to add custom JSX content to your markdown. Your first inclination may be to add the corresponding JSX to your source document and allow Cloudpress to export it to Contentful. However, this may not work as expected. Specifically, in the case of JSX, Cloudpress will encode some of the JSX markup when it exports the content. Let’s say you add the following JSX component to your source document:
Exporting this to Contentful will result in the following markdown. As you can see, Cloudpress encoded the JSX code.
To work around this problem, Cloudpress introduced a feature called Raw Content Blocks. When Cloudpress exports your content and encounters a Raw Content Block, it will send the content of that block to Contentful as-is.
The rest of this document will walk you through this feature by demonstrating how to use Raw Content Blocks in Google Docs and Notion to correctly export the JSX from the sample above.
Export your custom markdown
To export the custom markdown, you must define a raw content block using the@@begin_raw_content and @@end_raw_content processing directives.
- Denote the start of a raw content block by by adding the
@@begin_raw_contentdirective to your document. - After that, add the markdown
- Finally, close off a raw content block, use the
@@end_raw_contentdirective.
- Using Google Docs
- Using Notion

@@begin_raw_content and @@end_raw_content directives as raw content and will export it to Contentful as-is, without performing any HTML encoding.
When the document in the screenshots above is exported to Contentful, it will result in the markdown being exported without any HTML encoding applied to it.