-
If so, which technology should I use? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Marp CLI has been designed for server side JavaScript runtimes such as Node.js, and you cannot use CLI in the client-side JavaScript (on the web browser). You can use Marp Core to convert Markdown into HTML on the client JS. Probably you may have to bundle the package to target for web browsers, by using JavaScript bundler (e.g. Webpack, Vite, etc). Implementing perfect conversion for PDF, PPTX, and other formats on only client JavaScript is extremely difficult, because Marp CLI is depending on Puppeteer (provides API for controlling browser process itself). |
Beta Was this translation helpful? Give feedback.
Marp CLI has been designed for server side JavaScript runtimes such as Node.js, and you cannot use CLI in the client-side JavaScript (on the web browser).
You can use Marp Core to convert Markdown into HTML on the client JS. Probably you may have to bundle the package to target for web browsers, by using JavaScript bundler (e.g. Webpack, Vite, etc).
Implementing perfect conversion for PDF, PPTX, and other formats on only client JavaScript is extremely difficult, because Marp CLI is depending on Puppeteer (provides API for controlling browser process itself).