samuele-cozzi / obsidian-marp-slides

Create markdown-based Marp presentations in Obsidian
MIT License
80 stars 6 forks source link

Adding support for codeblock postprocessing #103

Closed shemraz closed 6 months ago

shemraz commented 12 months ago

Samuele, thank you for a fantastic plug-in! This deserves so much more attention, it completely revolutionises them way I use slides in Obsidian.

It would be great if the plug-in could support processed codeblocks, like Dataview tables, Mermaid and Nomnoml diagrams.

I forked the repo to test a few approaches for implementing this, however, it's slightly beyond my skills.

A possible approach would be to inject the rendered HTML into the slide preview by replacing the Marp codeblock with the SVG element from the Live Preview view.

Or alternatively, to preprocess the markdown text passed to the Marp API before it is rendered.

What do you think? Do you think this might be achievable?

samuele-cozzi commented 6 months ago

I the release 0.45.4 I have added some support for mardown-it plugins, in particular kroki.io that support a lot of diagrams. Thanks a lot for support