-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add mermaid support in markdown #185
Conversation
What's the TLDR on why it's so difficult to make the Mermaid content dynamic/reactive? |
Mostly because it generates a an SVG. We would need to somehow inject bound elements into the SVG (I think?) - not impossible, but tricky. I spent far too long Sunday & failed miserably. Maybe a fresh set of eyes can solve it? As for dynamically generating a mermaid chart by sending full markdown, that might be easier to achieve. |
I have dynamic content working with a trick found here: Screen.Recording.2023-09-12.at.19.57.21.movIt doesn't like it when the content of |
Cleaner demo by wiring it to a Slider: Screen.Recording.2023-09-13.at.08.28.20.mov |
Yes Screen.Recording.2023-09-13.at.08.54.22.mov |
No, it just renders the raw text, I'm guessing because the |
You still get "Syntax error in text" for dynamic mermaid content if you have multiple pages configured and you switch between them. |
Thanks @sieteunoseis - I've raised the issue for tracking here: #263 - will take a look soon. |
Adds mermaid support by way of a
```mermaid
code fence.Shortcomings
This 1st implementation has some short comings. Some will not be so easy to overcome without some kind of custom renderer and/or an AST
msg
Demo of code highlights and mermaid in one page
Demo flow used for above image