Pegmatite is Google Chrome extension that replace PlantUML code blocks into preview images.
You will see below | But we see |
---|---|
- This extension is enabled only in the whitelisted sites.
https://github.com/*
https://gist.github.com/*
https://gitpitch.com/*
https://gitlab.com/*
https://bitbucket.org/*
https://*.backlog.jp/wiki/*
- Replace only code block with lang
uml
and starts with@start
.- lang
puml
orplantuml
is also supported.
- lang
- When the element is double-clicked, element will toggle original code block and preview image.
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml
@startuml
[*] --> State1
State1 --> [*]
State1 : this is a string
State1 : this is another string
State1 -> State2
State2 --> [*]
@enduml
These cannot preview.
@startuml
Foo -> Bar
@enduml
foo
bar
baz
By default, Pegmatite uses PlantUML server
deployed to https://www.plantuml.com/plantuml
.
However, if your UML is confidential and you cannot send it to an external server, you can also use any PlantUML server. Configuring "Base URL" on the setting page, Pegmatite delegates image generation to this server.
Examples.
https://www.plantuml.com/plantuml/img/
(default)https://www.plantuml.com/plantuml/svg/
https://any-plantuml-server.example.com:8080/img/
Also you can run PlantUML server in localhost using Docker as following command:
$ docker run -d -p 8080:8080 plantuml/plantuml-server
And you can specify http://localhost:8080/img/
as Base URL.
Note: To avoid mixed-content, if the Base URL is not HTTPS scheme, generated image is converted to DATA URI.
- Fork (https://github.com/dai0304/pegmatite/fork)
- Create a feature branch named like
feature/something_awesome_feature
fromdevelop
branch - Commit your changes
- Rebase your local changes against the
develop
branch - Create new Pull Request
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.