GithubHelp home page GithubHelp logo

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:

```plantuml
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
```

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.

reveal-plantuml's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.