decaporg / decaporg/decap-cms

Render EditorComponent on main site

Open
#3,720 8 comments 0 reactions 0 assignees View on GitHub
area: extensions/editor-components kind: discussion
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

Hello,

I've registered a couple of editor components for the markdown widget that work fine in the preview pane of the Netlify CMS admin panel. However, I was hoping to see the same result on the actual site as well, supposing that either `gatsby-plugin-netlify` or `gatsby-plugin-netlify-cms` would handle that for me, but I realized it's out of their scope.

So the only way I - as a beginner to Gatsby - could work this around, is to use `rehype-react` to parse `htmlAst` and render a shared component between it and `registerEditorComponent's toPreview`.

I am wondering if there is a more elegant solution to do this, until the MDX support gets ready?

Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.