This is some code from @jgclark to help @EduardMe develop the Preview or Render feature.
Mermaid charts are supported from code blocks:
``` mermaid
... chart defintion
lines ...
``` .
(please ignore the closing period; it's just there to make this render in markdown)
MathML is basically working, and needs the same code block idea as for Mermaid above.