-
I am a user from China, forgive my poor English 😁.. I think MDX is amazing and interesting, and I'm planning to use it for my personal website, but I'm having a bit of trouble... For example, right now I can get the following code with the codemirror editor and compile() : Result👇 If I copy it 👆 to an mdx file, I can successfully use it as a component of the website But I want to use this MDX component right away, because it's temporary and needs to be changed frequently, I don't need to create a file, I want it to compile into a component that I can use right away. I don't know how the example of the official website is implemented, because I use Vite+vue3, I can't find a similar demo or method, vue seems to have no good plug-in to help me realize this function...😭 My ideal effect:👇 Rather than modifying the file manually or through a back-end server and returning the latest file |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You are looking for the |
Beta Was this translation helpful? Give feedback.
You are looking for the
evaluate
function: https://mdxjs.com/packages/mdx/#evaluatefile-options.