Skip to content

Self-links in Mermaid cause the Diagram to be inserted as an Image #5553

@r1ch

Description

@r1ch

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Description

Mermaid entity-relationship diagrams with self-links are always inserted as an Image

Reproduction

Steps to reproduce the behaviour:

  1. File > New
  2. Blank Diagram
  3. Arrange > Insert > Mermaid...
  4. Select "Diagram" in the drop down

Paste one of the following:

Minimal example that triggers the bug:

erDiagram

D["Draw.io"]
P["Pen and paper"]

D ||--|| D : "The best drawing tool since"

Note that this is inserted as a Image (you cannot edit / drag components)

Image

Minimal correction (D->P)

This is the same as the above but the link now goes D-->P, not D-->D (self-link)

erDiagram

D["Draw.io"]
P["Pen and paper"]

D ||--|| P : "The best drawing tool since"

Note that this is inserted as a Diagram (you can select / edit / move the compoents)

Image

Expected behaviour

I would expect the diagram to be drawn exactly as it is
But inserted as a Diagram (not an Image) so that the components are editable / can be dragged / lines moved.

Screenshots

Inline above

draw.io version

v29.7.9

Desktop:

  • OS: Mac OS Tahoe 26.4.1
  • Browser: Chrome
  • Browser Version: 147.0.7727.102 (Official Build) (arm64)

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions