gt6796c / mermaid-tw5

Tiddly Wiki 5 plugin to support the mermaid library
MIT License
19 stars 10 forks source link

Feature request: Compatibility with Markdown syntax #11

Open AntonioGHub opened 5 years ago

AntonioGHub commented 5 years ago

It would be great to be able to insert mermaid diagrams into a markdown styled tiddler (not just a TiddlyWiky complaint tiddler).

I have no idea of how TIddlyWiki plugins are developed, so I was wondering if it was too much effort to do that.
My favorite markdown plugin is tw5-markdown: Comprehensive Markdown plugin for TiddlyWiki which supports extended markdown, but it is not recognizing the mermaid widget.

Essentially I'd like to be able to put the widget tag

<$mermaid text="...
"><$mermaid>

into a markdown tiddler.

Even better, I'd like the text to be wrapped in an extended markdown code snippets like this.

```mermaid
graph LR
A-->B
B-->C
```

Also if you know about an extended markdown plugin for TiddlyWiki which works with your mermaid plugin it would as well welcome.

Finally I accept guidance/suggestions on how to implement it myself.