I built my own Rust TUI ADE and it's this type of functionality (in app embedded html, mermaid diagrams, pretty formatted markdown, preview images) that is honestly about to make me abandon it. Maybe it's possible in Rust, but electron probably makes it much easier.