Is your feature request related to a problem? Please describe.
I'm using Decap CMS, mdx format (next-mdx-remote library) in the Next.js. I need React components to render in the preview after being included in the markdown widget.
As you can see, the React components are missing in the preview, and only the text Tweet is rendered.
The published version displays the page correctly, indicating that the preview lacks the necessary configuration to render React components.
Describe the solution you'd like
Adding missing configuration in public/admin/index.html, possibly including a script to render React components in the preview.
Describe alternatives you've considered
I tried CMS.registerPreviewTemplate("posts", PostPreview); and registerPreviewStyle in the index.html script, but these methods did not render React components in the markdown widget.
Is your feature request related to a problem? Please describe.
I'm using Decap CMS,
mdx
format (next-mdx-remote library) in the Next.js. I need React components to render in the preview after being included in the markdown widget.Markdown widget content:
Here’s how it appears in a published article:
And here’s how it looks in the preview:
As you can see, the React components are missing in the preview, and only the text Tweet is rendered.
The published version displays the page correctly, indicating that the preview lacks the necessary configuration to render React components.
Describe the solution you'd like Adding missing configuration in
public/admin/index.html
, possibly including a script to render React components in the preview.Describe alternatives you've considered
I tried CMS.registerPreviewTemplate("posts", PostPreview); and registerPreviewStyle in the index.html script, but these methods did not render React components in the markdown widget.