1.0.2 • Published 4 years ago

reveal-plantuml v1.0.2

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

reveal-plantuml

NPM License: MIT Issues

A reveal.js plugin that allow using PlantUML diagrams on HTML and Markdown slides. Check live demo to see plugin in action.

Installation

You can use the plugin directly from CDN:

Reveal.initialize({
  dependencies: [
    { src: '//cdn.jsdelivr.net/npm/reveal-plantuml' },
  ]
});

or install using npm:

npm i reveal-plantuml

Usage

Simply put PlantUML diagrams in code block. In markdown use plantuml language type:

The @startuml and @enduml lines are optional.

In HTML use language-plantuml class in code element inside of pre element:

<pre>
<code class="language-plantuml">
  @startuml
  Alice -> Bob: Authentication Request
  Bob --> Alice: Authentication Response
  Alice -> Bob: Another authentication Request
  Bob --> Alice: Another authentication Response
  @enduml
</code>
</pre>

The @startuml and @enduml lines are optional.

Options

You can set PlantUML server path using serverPath configuration option:

Reveal.initialize({
  plantuml: {
      serverPath: 'https://plantuml.example.com/plantuml/svg/'
  }
  dependencies: [
    { src: '//cdn.jsdelivr.net/npm/reveal-plantuml' },
  ]
});

The default server path is //www.plantuml.com/plantuml/svg

License

This project is licensed under the MIT License. See the LICENSE for details.

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago