[Feature Request] Support Elk Rendering in Mermaid
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 11m
- Merged PRs (30d)
- 10
Description
**Is your feature request related to a problem? Please describe.**
Mermaid now supports Elk renderer (https://mermaid.js.org/config/schema-docs/config.html#defaultrenderer). This allows you to have a very different (and superior imo) layout for generated diagrams.
**Describe the solution you'd like**
While you can use the mermaid options to pass a DefaultRenderer value, the Elk renderer must be manually loaded by calling
```js
import elkLayouts from "https://cdn.jsdelivr.net/npm/@mermaid-js/layout-elk@latest/dist/mermaid-layout-elk.esm.min.mjs"
mermaid.registerLayoutLoaders(elkLayouts)
```
or similar prior to calling mermaid.initialize.
There's no way to currently do this.
**Describe alternatives you've considered**
Provide a hook where additional js code can be injected to manipulate the mermaid object.
**Additional context**
See https://github.com/mermaid-js/mermaid/issues/5969#issuecomment-2645923926
Contributor guide
Assessment
This issue has not been assessed yet.