marcozaccari / markdown-diagrams-browser-extension

A browser extension for Chrome, Edge, Opera and Firefox that renders markdown diagrams and charts code blocks into preview images.
MIT License
56 stars 27 forks source link

Markdown Diagrams (browser extension)

A browser extension for Chrome, Edge, Opera and Firefox that renders markdown diagrams and charts code blocks into preview images.

Supports many languages

PlantUML, Mermaid, C4 with PlantUML, GraphViz, Erd, Nomnoml, BPMN, BlockDiag, SeqDiag, ActDiag, NwDiag, PacketDiag, RackDiag, Bytefield, Ditaa, Svgbob, UMlet, Vega, Vega-Lite, WaveDrom.

Supports any website

Install

How to use

Simply put diagram or chart code into a blockquote:

```language

code here

Double click to rendered diagram to swith to code/diagram. 
Click to extension icon to disable/enable parsing in current browser tab.

## Examples
Diagrams and charts code examples [here](doc/examples) and [here](https://kroki.io/examples.html).

![Diagram example](https://kroki.io/plantuml/svg/eJxNjrEOwjAMRHd_hZUJkPoLVTswMMNWdYiK01hKE5S4C1-Po2RgsvXufOepiM1yHgEutysOw4jmEVnYBv5a4RQNADs0z3QQvqiIQfEUAat3kXzS2sV5a3ZsKXNMasz_OPPuRTVtAgqFKhsXZ3XtIeI57li1nrPc47uiT04blbK2W2UOYNKpj_8Ace07KA==)
<details>
    <summary>Show code</summary>

    ```plantuml
    @startuml
    (*) --> "Initialization"

    if "Some Test" then
    -->[true] "Some Action"
    --> "Another Action"
    -right-> (*)
    else
    ->[false] "Something else"
    -->[Ending process] (*)
    endif

    @enduml

Chart example

Show code ```mermaid pie "Dogs" : 386 "Cats" : 85 "Rats" : 15 ```

Special thanks

Some work derived from https://github.com/dai0304/pegmatite and https://github.com/asciidoctor/asciidoctor-browser-extension.