How to use it in Nuxt3?
Hi, many thanks for your work!
Could you please help me ?I want to use it in Nuxt3, but the server rendering cannot operate on the DOM. What should I do.
I want to use it in Nuxt3, but the server rendering cannot operate on the DOM. What should I do.
@mylooksback mathpix-markdown-it uses domino to work with the DOM tree where it is not supported, and liteAdaptor is used to render the math.
This should work for server rendering as well.
This is a working example for node.js
https://github.com/Mathpix/mathpix-markdown-it/blob/master/examples/app.js
htmlMM = MathpixMarkdownModel.markdownToHTML(text);
Here you can pass the resulting htmlMM to the client side.
Or use Puppeteer to paste the htmlMM and get the finished page on the server.
More use cases on the server side: https://github.com/Mathpix/mathpix-markdown-it/tree/master#nodejs
I also have the same question. Can you tell me the specific import method in nuxt3