PlantUML

by Johannes Theiner
5
4
3
2
1
Score: 77/100

Description

Category: Coding & Technical Tools

The PlantUML plugin for Obsidian allows users to render PlantUML diagrams directly within their notes. This plugin uses either the online PlantUML server or a local .jar file for rendering, providing flexibility in terms of performance and customization. Users can create fenced code blocks using plantuml as the language and specify their PlantUML code inside. The plugin also supports linking to other notes in the vault, including ASCII art diagrams. With this plugin, users can easily integrate visualizations into their notes, making it an excellent tool for creating interactive and engaging content.

Reviews

No reviews yet.

Stats

528
stars
144,606
downloads
35
forks
1,916
days
7
days
7
days
9
total PRs
2
open PRs
1
closed PRs
6
merged PRs
69
total issues
20
open issues
49
closed issues
9
commits

Latest Version

8 days ago

Changelog

What's Changed

New Contributors

Full Changelog: https://github.com/joethei/obsidian-plantuml/compare/1.8.1...1.9.0

README file from

Github

PlantUML Support for Obsidian

libera manifesto

Render PlantUML Diagrams in Obsidian


Demonstration

This plugin uses either the PlantUML Online Server, or a local .jar file for rendering.

You can also host your own server (Docker / JEE / PicoWeb) and specify its address in the settings.

Please note that using the local rendering method is not as performant as using a server.

Usage

Create a fenced codeblock using plantuml as the language. Specify your plantuml code inside. To generate a diagram with higher resolution use plantuml-svg

You can also use plantuml-ascii to generate ASCII Art.

Documentation on Plantuml can be found on plantuml.com

Linking to notes in vault

Since the syntax for weblinks in PlantUML is the same for as for Wikilinks in Obsidian, a special syntax is used: [[[Your other note]]] For the content of such a link refer to the obisidian documentation.

Normal web links are described here

Including an .puml file

⚠️ Only works when using local rendering

This works just as describe in the official documentation.

Examples

```plantuml
Bob -> Alice : hello
Alice -> Wonderland: hello
Wonderland -> next: hello
next -> Last: hello
Last -> next: hello
next -> Wonderland : hello
Wonderland -> Alice : hello
Alice -> Bob: hello
```

results in:

```plantuml-ascii
Bob -> Alice : hello
Alice -> Wonderland: hello
Wonderland -> next: hello
next -> Last: hello
Last -> next: hello
next -> Wonderland : hello
Wonderland -> Alice : hello
Alice -> Bob: hello
```

results in:

     ┌───┐          ┌─────┐          ┌──────────┐          ┌────┐          ┌────┐
     │Bob│          │Alice│          │Wonderland│          │next│          │Last│
     └─┬─┘          └──┬──┘          └────┬─────┘          └─┬──┘          └─┬──┘
       │    hello      │                  │                  │               │   
       │──────────────>│                  │                  │               │   
       │               │                  │                  │               │   
       │               │      hello       │                  │               │   
       │               │─────────────────>│                  │               │   
       │               │                  │                  │               │   
       │               │                  │       hello      │               │   
       │               │                  │ ─────────────────>               │   
       │               │                  │                  │               │   
       │               │                  │                  │     hello     │   
       │               │                  │                  │ ──────────────>   
       │               │                  │                  │               │   
       │               │                  │                  │     hello     │   
       │               │                  │                  │ <──────────────   
       │               │                  │                  │               │   
       │               │                  │       hello      │               │   
       │               │                  │ <─────────────────               │   
       │               │                  │                  │               │   
       │               │      hello       │                  │               │   
       │               │<─────────────────│                  │               │   
       │               │                  │                  │               │   
       │    hello      │                  │                  │               │   
       │<──────────────│                  │                  │               │   
     ┌─┴─┐          ┌──┴──┐          ┌────┴─────┐          ┌─┴──┐          ┌─┴──┐
     │Bob│          │Alice│          │Wonderland│          │next│          │Last│
     └───┘          └─────┘          └──────────┘          └────┘          └────┘

Known issues

Not all methods of using PlantUML support all different diagrams. Following are a few known issues.

  • ASCII can only ever generate Sequence diagrams
  • The PicoWeb server does not support clickable links in png diagrams
  • Some languages like chinese are not rendered correctly -> Switch to SVG rendering

Installation

Settings > Community plugins > Community Plugins > Browse and search for PlantUML.