silvenon / vscode-mdx

MDX for Visual Studio Code

Home Page:https://marketplace.visualstudio.com/items?itemName=silvenon.mdx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add preview feature

silvenon opened this issue · comments

This is inherently tricky because we have to make some sort of a subset, we have to gracefully degrade what we can't display, like imported React components.

See vscode-mdx-preview for inspiration.

This would be great and an already useful intermediate step would be to allow triggering a preview in one of the markdown preview extensions (e.g. "Markdown Preview Enhanced").
Having some sort of preview that ignores the React Parts (or treats them as HTML) is more helpful than none at all and fully evaluating the MDX is not realistically practically in more complex environents as e.g. GastbyJS (experienced with the preview plugin linked above).

Agreed. I currently have zero free time, but in January I could get this working.

I can't seriously promise time, too - hence no PR but an Issue :-(

Yeah, I immediately deleted that "PR welcome" part from my comment because everyone already knows that 😅

Maybe we can use react-live, following this example: https://mdxjs.com/guides/live-code