Skip to content

Allow user to specify custom language type for codeblock

Himanshu Kapoor requested to merge 357632-custom-codeblock-type into master

What does this MR do and why?

Allow custom language types in content editor code blocks

Related to #357632 (closed)

Screenshots or screen recordings

Screen_Recording_2022-04-20_at_11.57.53_PM

How to set up and validate locally

  1. Enable PlantUML and Kroki in Admin -> Settings -> General image
  2. Open a wiki page and click "Edit rich text" to open the content editor
  3. Create a new code block
  4. In the language selection dropdown, click "Create custom type"
  5. In the input box, type plantuml, mermaid or nomnoml.
  6. Based on the diagram type you entered, enter either any of the following diagram examples
```plantuml
  Alice -> Bob: Authentication Request
  Bob --> Alice: Authentication Response

  Alice -> Bob: Another authentication Request
  Alice <-- Bob: Another authentication Response
```
```nomnoml
  #stroke: #a86128
  [<frame>Decorator pattern|
    [<abstract>Component||+ operation()]
    [Client] depends --> [Component]
    [Decorator|- next: Component]
    [Decorator] decorates -- [ConcreteComponent]
    [Component] <:- [Decorator]
    [Component] <:- [ConcreteComponent]
  ]
```
```mermaid
graph TD;
  A-->B;
  A-->C;
  B-->D;
  C-->D;
```

MR acceptance checklist

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

Edited by Himanshu Kapoor

Merge request reports