Summary
Add support for rendering inline PlantUML diagrams in the AsciiDoc preview and HTML export without requiring a Kroki server.
Motivation
The extension already supports client-side rendering for Mermaid diagrams in preview. PlantUML diagrams currently rely on Kroki in many cases, which means users need a network-accessible Kroki server even for simple inline diagrams.
It would be useful to support [plantuml] blocks directly in the preview, similar to the approach used for Mermaid rendering, while keeping Kroki compatibility for existing diagram attributes and output structure.
Proposed Behavior
When Kroki is disabled, [plantuml] listing/literal blocks should render locally in the preview using @plantuml/core.
The generated preview HTML should stay compatible with the structure emitted by asciidoctor-kroki where practical, including:
- block titles and figure captions
- roles and Kroki-style format classes
kroki-default-format
kroki-plantuml-include
subs
- custom block attributes/options
HTML export should also include browser-side PlantUML rendering by loading @plantuml/core from a CDN, so exported HTML can display PlantUML diagrams after opening in a browser.
Notes
PlantUML block macros such as plantuml::diagram.puml[] can remain handled by Kroki, since they require file/URL resolution behavior that differs from inline block rendering.
The renderer should avoid requiring JavaScript unsafe-eval; if WebAssembly support needs CSP adjustment in the VS Code preview, it should be scoped as narrowly as possible.
Summary
Add support for rendering inline PlantUML diagrams in the AsciiDoc preview and HTML export without requiring a Kroki server.
Motivation
The extension already supports client-side rendering for Mermaid diagrams in preview. PlantUML diagrams currently rely on Kroki in many cases, which means users need a network-accessible Kroki server even for simple inline diagrams.
It would be useful to support
[plantuml]blocks directly in the preview, similar to the approach used for Mermaid rendering, while keeping Kroki compatibility for existing diagram attributes and output structure.Proposed Behavior
When Kroki is disabled,
[plantuml]listing/literal blocks should render locally in the preview using@plantuml/core.The generated preview HTML should stay compatible with the structure emitted by
asciidoctor-krokiwhere practical, including:kroki-default-formatkroki-plantuml-includesubsHTML export should also include browser-side PlantUML rendering by loading
@plantuml/corefrom a CDN, so exported HTML can display PlantUML diagrams after opening in a browser.Notes
PlantUML block macros such as
plantuml::diagram.puml[]can remain handled by Kroki, since they require file/URL resolution behavior that differs from inline block rendering.The renderer should avoid requiring JavaScript
unsafe-eval; if WebAssembly support needs CSP adjustment in the VS Code preview, it should be scoped as narrowly as possible.