nea / MarkdownViewerPlusPlus

A Notepad++ Plugin to view a Markdown file rendered on-the-fly
MIT License
1.19k stars 141 forks source link

[Feature Request] Support for mermaid diagrams #78

Open fazleskhan opened 6 years ago

fazleskhan commented 6 years ago

Preview support for mermaid diagrams. https://mermaidjs.github.io/

For example

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;

Should display

mermaid_sample

monoblaine commented 6 years ago

@fazleskhan MarkdownViewerPlusPlus uses HTML-Renderer to render HTML code but SVG (among many other things) is not supported. Although I guess it's still possible to convert svg images to png files on-the-fly and have them displayed on the screen, I don't think it's worth the effort to do that. I've tried using the WebBrowser component (Uses IE11) but mermaid has compatibility problems with IE (labels are not displayed). Luckily, Microsoft recently made Edge browser available as a WebView component. I was curious (and it killed me), and got it working:

image

It's experimental but you can take a look at my fork:

https://github.com/monoblaine/MarkdownViewerPlusPlus/tree/0.8.1

maxaxehax commented 6 years ago

Just use plantUML and it's plugins for Npp instead