Real-time Markdown Preview with @nuxt/content for Client-side Editing
When using @nuxt/content for client-side Markdown editing (users creating new pages), how can I preview the rendered result in real-time?
Current challenges:
The client cannot directly transform Markdown to HTML because @nuxt/content's components (e.g., <ContentRenderer> from components/content) rely on server-side processing. Must I send Markdown to the server, transform it, then send it back to the client for preview? This approach introduces latency.
I'm trying to achieve real-time client-side preview but facing obstacles due to the server-side nature of components/content integration. How can I resolve this?
Thank you!
You can use parseMarkdown from @nuxtjs/mdc to parse your content on the client side and render it. @nuxtjs/mdc is the parsing/rendering core of Nuxt Content.
Check out <MDCRenderer> example of @nuxtjs/mdc https://github.com/nuxt-modules/mdc#mdcrenderer
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.