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

Draw-Diagrams-With-Markdown | 仲夏叶 | Ryan Stornado #21

Open
stornado opened this issue May 29, 2020 · 2 comments
Open

Draw-Diagrams-With-Markdown | 仲夏叶 | Ryan Stornado #21

stornado opened this issue May 29, 2020 · 2 comments

Comments

@stornado
Copy link
Owner

https://stornado.github.io/2020/05/23/draw-diagrams-with-markdown/

Draw Diagrams With Markdown August 15, 2016 by typora.io Typora supports some Markdown extensions for diagrams, once they are enabled from preference panel. When exporting as HTML, PDF, epub, docx, th

@stornado
Copy link
Owner Author

stornado commented May 29, 2020

sequence

```sequence
```

flowchart

```flow
```

mermaid

sequence

```mermaid
sequenceDiagram
```

flowchart

```mermaid
graph TB
```

class

```mermaid
classDiagram
```

pie

```mermaid
pie
```

@stornado
Copy link
Owner Author

  NexT.utils.getScript('{{ mermaid_uri }}', () => {
    mermaid.initialize({
      theme    : '{{ theme.mermaid.theme }}',
      logLevel : 3,
      flowchart: { curve     : 'linear' },
      gantt    : { axisFormat: '%m/%d/%Y' },
      sequence : { actorMargin: 50 }
    });
  }, window.mermaid);

由于 mermaid 初始化时使用了 window.mermaid,故不能用 mermaid 中标题,否则会导致 mermaid.initialize 无效,不能初始化 mermaid,无法渲染图形

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

1 participant