benweet / stackedit

In-browser Markdown editor
https://stackedit.io/
Apache License 2.0
21.49k stars 2.7k forks source link

Graphviz support #794

Open jbaum98 opened 9 years ago

jbaum98 commented 9 years ago

In the fashion of the sequence and UML diagrams, add support for graphs and other images using http://www.gravizo.com

It would probably function by taking the input, url encoding it and appending it to the url. For example, this currently works

![](http://g.gravizo.com/g?%40startuml%0A%0Aactor%20User%0Aparticipant%20%22First%20Class%22%20as%20A%0Aparticipant%20%22Second%20Class%22%20as%20B%0Aparticipant%20%22Last%20Class%22%20as%20C%0A%0AUser%20-%3E%20A%3A%20DoWork%0Aactivate%20A%0A%0A%40enduml%0A%20%20%20%20%20%20%20%20%20%20%20%20)

Edit: fixed link thanks @jldiaz

jldiaz commented 9 years ago

Your example doesn't work because it should be a ? after the /g.

PanderMusubi commented 8 years ago

See also https://github.com/benweet/stackedit/issues/545 and https://github.com/benweet/stackedit/issues/569 for support of PlantUML. Graphviz is used by PlantUML but should be used directly for generating UML diagrams. Using Gravizo is an alternative form of using PlantUML however note that Gravizo is a commercial service.

karlb commented 5 years ago

This could also be built using http://viz-js.com/ instead of gravizo.