Skip to content

tenuki/markdown-it-plantuml-online

Repository files navigation

markdown-it-plugin-pikchr

Actions Status Actions Status

How to add Pikchr support to Markdown-It

Use markdown-it-plantuml-online as a regular plugin.

npm install markdown-it markdown-it-plantuml-online

Configure the markdown-it instance:

// node.js, "classic" way:
var plantuml = require('markdown-it-plantuml-online');
var MarkdownIt = require('markdown-it'),
    md = new MarkdownIt();
    md.use(plantuml);   // md.use(plantuml, {..})   with options
var result = md.render(aMarkdownDocument);

Document including:

    ```plantuml
    @startuml
    
    [*] --> State1
    State1 --> [*]
    State1 : this is a string
    State1 : this is another string
    
    State1 -> State2
    State2 --> [*]
    
    @enduml
    ```

Code based on: https://github.com/christianvoigt/argdown/tree/master/packages/argdown-markdown-it-plugin

About

Allow plantuml diagrams in markdown-it's markdown fences

Resources

License

Stars

Watchers

Forks

Packages

No packages published