Skip to content

Allow editing plantuml/kroki diagrams in content editor

Himanshu Kapoor requested to merge 332095-plantuml into master

What does this MR do and why?

Extend the Content Editor to support rendering PlantUML and Kroki diagrams in the document. Fixes issues #332095 (closed), #332097 (closed).

Screenshots or screen recordings

PlantUML

Source Source Screenshot Screenshot in content editor
```plantuml
  Alice -> Bob: Authentication Request
  Bob --> Alice: Authentication Response

  Alice -> Bob: Another authentication Request
  Alice <-- Bob: Another authentication Response
```
image image

Kroki

Source Source Screenshot Screenshot in content editor
```nomnoml
  #stroke: #a86128
  [<frame>Decorator pattern|
    [<abstract>Component||+ operation()]
    [Client] depends --> [Component]
    [Decorator|- next: Component]
    [Decorator] decorates -- [ConcreteComponent]
    [Component] <:- [Decorator]
    [Component] <:- [ConcreteComponent]
  ]
```
image image

How to set up and validate locally

  1. Enable PlantUML and Kroki in Admin -> Settings -> General

image

  1. On any wiki page and add a PlantUML or Kroki diagram code as above

  2. Click "edit rich text" to enable content editor. You will see a code block render instead of the diagram.

  3. Save. It should render as a diagram in the wiki view.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #332095 (closed), #332097 (closed)

Edited by Brett Walker

Merge request reports