Skip to content

mermaid: Allow using elk layout #34769

Open
@NightTsarina

Description

@NightTsarina

Feature Description

Hi,

I love the ability to use Mermaid directly from markdown, but there is one very useful feature missing: the ability to use the "elk" layout/renderer.

I tried both the layout and defaultRenderer configuration options (still not sure what's the difference), and passing those via front-matter and directives, but none seems to work.

Code:

---
config:
  layout: elk
  flowchart:
    defaultRenderer: elk
---
%%{ init: { "layout": "elk", "flowchart": { "defaultRenderer": "elk" } } }%%
flowchart TB
  A --> B
  A --> C --> B

Screenshots

Rendered with the live editor, setting layout: dagre and layout: elk:

layout:elk layout:dagre

With Gitea:

layout:elk layout:dagre

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions