Hello, I'm trying to create an export plugin for Reveal.js (https://revealjs.com/
) (HTML-based presentation tool).
However Reveal.js has some support for Markdown, I'd love to use Joplin renderer to produce a Reveal.js HTML Markup (https://revealjs.com/markup/
) so that all cool features like Mermaid.js diagrams are working.
The exporter should
- run on one note,
- taking its markdown body, and splitting it by
---
(<hr>
) to get markdown slides - render markdown for each slide to get content for
<section>
(Reveal.js slide boundry) - pack all rendered HTML slides into one sldieshow HTML (with all CSS/JS links for Reveal.js and Joplin/plugins) + export resoruces (and fix links).
I've followed the json_exporter
example, so I can figure out most points in the outlined flow above. The only missing one is point 3: how to render markdown in Joplin plugin (implementing ExportModule
interface)?
So my question is: Is threre an elegant way to access joplin renderer within a plugin?
So far I was able to come up with only (theoretical) solution to bundle whole joplin-renderer npm package with plugin via webpack (somehow), which sounds to me a bit clumsy. Is there a better way?