This extension adds nomnoml uml diagram support to Visual Studio Code's built-in Markdown preview. Nomnoml provides a way for drawing UML diagrams based on a simple syntax. You can get a quick overview and play with nomnoml on the nomnoml.com website.
This extension was made possible by the following projects:
With the extension you can add nomnoml
code blocks to your markdown documents. These code blocks are rendered to uml diagrams in VS Code's built-in markdown preview.
The nomnoml code block
```nomnoml
[<frame>Decorator pattern|
[<abstract>Component||+ operation()]
[Client] depends --> [Component]
[Decorator|- next: Component]
[Decorator] decorates -- [ConcreteComponent]
[Component] <:- [Decorator]
[Component] <:- [ConcreteComponent]
]
```
is rendered as
Via the following extension settings, you can customize the default nomnoml style.
markdown-nomnoml.style.defaultBackgroundColor
: set the default background color
#fff
or transparent
markdown-nomnoml.style.defaultStrokeAndTextColor
: set the default stroke and text color
#000
or red
markdown-nomnoml.style.defaultShapeColor
: set the default shape and inner shape color
blue
(shapes and inner shapes set to blue
), #fff; #f00
(shapes set to white
and inner shapes to red
)Setting the following user settings,
"markdown-nomnoml.style.defaultBackgroundColor": "transparent",
"markdown-nomnoml.style.defaultStrokeAndTextColor": "#B0BEC5",
"markdown-nomnoml.style.defaultShapeColor": "#455A64; #37474F"
will give you the following custom look
nomnoml syntax documentation copied from nomnoml README
- association
-> association
<-> association
--> dependency
<--> dependency
-:> generalization
<:- generalization
--:> implementation
<:-- implementation
+- composition
+-> composition
o- aggregation
o-> aggregation
-- note
-/- hidden
[name]
[<abstract> name]
[<instance> name]
[<reference> name]
[<note> name]
[<package> name]
[<frame> name]
[<database> name]
[<start> name]
[<end> name]
[<state> name]
[<choice> name]
[<input> name]
[<sender> name]
[<receiver> name]
[<transceiver> name]
[<actor> name]
[<usecase> name]
[<label> name]
[<hidden> name]
#arrowSize: 1
#bendSize: 0.3
#direction: down | right
#gutter: 5
#edgeMargin: 0
#edges: hard | rounded
#fill: #eee8d5; #fdf6e3
#fillArrows: false
#font: Calibri
#fontSize: 12
#leading: 1.25
#lineWidth: 3
#padding: 8
#spacing: 40
#stroke: #33322E
#title: filename
#zoom: 1
A directive that starts with "." define a classifier style.
#.box: fill=#88ff88
#.blob: fill=pink visual=ellipse
[<box> GreenBox]
[<blob> HideousBlob]
Available visuals are
visual=actor
visual=class
visual=database
visual=ellipse
visual=end
visual=frame
visual=hidden
visual=input
visual=none
visual=note
visual=package
visual=receiver
visual=rhomb
visual=roundrect
visual=sender
visual=start
visual=transceiver
The nomnoml svg renderer used by the extension doesn't support all of the custom classifier styles.
Unsupported modifiers are
center
bold
underline
italic
dashed
empty
This list might be inconclusive.
Two defects related to markdown preview fixed.
Initial release of markdown-nomnoml adding nomnoml uml diagram support to VS Code's built-in markdown preview. Supporting custom default background, stroke, shape, and text colors.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。