GithubHelp home page GithubHelp logo

reveal-plantuml / reveal-plantuml.github.io Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 8.0 510 KB

A reveal.js plugin that allow using PlantUML diagrams on slides

Home Page: https://reveal-plantuml.github.io

License: MIT License

HTML 81.30% JavaScript 18.70%

reveal-plantuml.github.io's Introduction

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.github.io's People

Contributors

szkiba avatar

Stargazers

Andreas Thoelke avatar Daniel Zhang avatar O Teerasak Vichadee avatar tomoyukim avatar Jeff Tian avatar Paweł Staniszewski avatar Florian Kammermann avatar  avatar ryo avatar Sean Marquez avatar Ali Shahid avatar comet11x avatar  avatar Peter Nguyen avatar  avatar SonarBeserk avatar Ilya avatar Seb avatar Norbert Sana avatar Rohit Trivedi avatar

Watchers

James Cloos avatar  avatar

reveal-plantuml.github.io's Issues

Failed to load resource: too many HTTP redirects

[Error] Failed to load resource: too many HTTP redirects (reveal-plantuml, line 0)

As title, I am going crazy to make this plugin work. I know the import is deprecated from reveal.js, but I was able to make it work, commit to my local GitHub repo, changed theme, and then everything got broken and I can't even render plantUML files on the demo presentation you provide.

Also, I tried to install it via npm i reveal-plantuml but didn't have any success. Can you please help me? I'm going crazy!

CleanShot 2024-06-01 at 17 06 50@2x

Markdown examples use incorrect language annotation

I could not get the plugin to correctly render PlantUML diagrams defined in Markdown sections. It turns out, it's also necessary to use language-plantuml instead of just plantuml to make the diagrams render. This is on Reveal.js-4.1.0, so it might be a change in that codebase that causes the examples to fail.

Long diagrams are not resized to fit screen

If a diagram does not fit the screen, I expect it to be resized to not exceed the screen. Instead, it is currently cut off.

Would you have an idea how I could achieve a scaled diagram?

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.