letiantian / markdown-diagrams-renderer

This is an extensions for chrome browser, which is used to render diagrams in markdown.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markdown diagrams renderer

这是一个chrome浏览器插件,用于渲染github markdown中的时序图、流程图。

This is an extensions for chrome browser, which is used to render diagrams in markdown. Now it support sequence chart, flowchart.

Usage

  1. Install this extension by developer mode.
  2. Click icon, then click 点击渲染 button.

TODO

  • support auto-render
  • support fullscreen
  • support change background
  • support download image
  • support mermaid
  • change to customized icon
  • upload to chrome webstore

Example

sequence

```sequence
Title: Here is a title
A->B: Normal line
B-->C: Dashed line
C->>D: Open arrow
D-->>A: Dashed open arrow
```
Title: Here is a title
A->B: Normal line
B-->C: Dashed line
C->>D: Open arrow
D-->>A: Dashed open arrow

flowchart

```flow
st=>start: Start:>http://www.google.com[blank]
e=>end:>http://www.google.com
op1=>operation: My Operation
sub1=>subroutine: My Subroutine
cond=>condition: Yes
or No?:>http://www.google.com
io=>inputoutput: catch something...

st->op1->cond
cond(yes)->io->e
cond(no)->sub1(right)->op1
```
st=>start: Start:>http://www.google.com[blank]
e=>end:>http://www.google.com
op1=>operation: My Operation
sub1=>subroutine: My Subroutine
cond=>condition: Yes
or No?:>http://www.google.com
io=>inputoutput: catch something...

st->op1->cond
cond(yes)->io->e
cond(no)->sub1(right)->op1

mermaid

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
Loading
sequenceDiagram
    participant Alice
    participant Bob
    Alice->John: Hello John, how are you?
    loop Healthcheck
        John->John: Fight against hypochondria
    end
    Note right of John: Rational thoughts <br/>prevail...
    John-->Alice: Great!
    John->Bob: How about you?
    Bob-->John: Jolly good!
Loading
gantt
        dateFormat  YYYY-MM-DD
        title Adding GANTT diagram functionality to mermaid
        section A section
        Completed task            :done,    des1, 2014-01-06,2014-01-08
        Active task               :active,  des2, 2014-01-09, 3d
        Future task               :         des3, after des2, 5d
        Future task2               :         des4, after des3, 5d
        section Critical tasks
        Completed task in the critical line :crit, done, 2014-01-06,24h
        Implement parser and jison          :crit, done, after des1, 2d
        Create tests for parser             :crit, active, 3d
        Future task in critical line        :crit, 5d
        Create tests for renderer           :2d
        Add to mermaid                      :1d
Loading

License

MIT

About

This is an extensions for chrome browser, which is used to render diagrams in markdown.


Languages

Language:CSS 62.4%Language:JavaScript 35.0%Language:HTML 2.6%