Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview of mermaid diagrams in separate files #832

Open
sindre-nistad opened this issue Mar 23, 2020 · 6 comments
Open

Preview of mermaid diagrams in separate files #832

sindre-nistad opened this issue Mar 23, 2020 · 6 comments

Comments

@sindre-nistad
Copy link

Hi,
Would it be possible to have Markdown Navigator render / preview mermaid files (.mmd)?

Some background

Since GitHub does not support mermaid rendering (yet), I have to create separate SVG / PNGs from separate files. In order to preview them, I could change the file extension to .md, and then surround the content with

```mermaid
<content remind unchanged>
```

The files are then passed though markdown.cli (which crashes when it sees ```)

This is a bit inconvenient, and so it would be nice to have Markdown Navigator to these steps (or similar) behind the scenes.


Or better yet, have GitHub implement the rendering

@vsch
Copy link
Owner

vsch commented Mar 26, 2020

@sindre-nistad, the extension to language mapping is controlled by the IDE. The plugin provides defaults: .md, .mkd and .markdown.

If you add .mmd extension association with Markdown language in Editor | File Types

image

If you know if any website which renders mermaid syntax to image similar to gravizo.com for UML and codecogs.com for Latex then I can add an option to use that site for rendering mermaid instead of the JavaScript in the rendering page.

This would allow creating mermaid HTML images using that site and conversion between HTML tags and fenced code syntax as done for Math and UML elements. It makes it a little easier to maintain since the conversion can be done by the plugin in the markdown source.

@antonbabenko
Copy link

http://kroki.io/ can do rentering as image and much more.

@vsch
Copy link
Owner

vsch commented Apr 5, 2020

@antonbabenko, thank you for the rendering site link. I will add it as an option.

@antonbabenko
Copy link

Great plugin! 👍

I am looking forward to getting the full support of Mermaid in this plugin so that I don't have to use mermaid-live-editor all the time.

@vsch
Copy link
Owner

vsch commented Apr 10, 2020

Kroki support is working, now all fenced code special rendering is configured in Fenced Code

Also added JLatexMath rendering to images to allow embedding images in PDFs by using it as the rendering option.

I just have to update documentation and fix a late found bug and I will release an EAP version for 2020.1, and maybe for 2019.x IDEs also. The latter is a ton of work since the source branches have diverged and require manual code merging for the project. I would like not to have to do it more than once per release cycle.

@vsch
Copy link
Owner

vsch commented Apr 11, 2020

EAP update with a fix for the issue is available.

Installing EAP Plugin Version

Please note the change that EAP channel is for JetBrains licensed plugin and Legacy EAP is for legacy licensing by vladsch.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants