Skip to content

Pressing “Sample Diagrams” clears the current canvas without warning #1753

@MB175

Description

@MB175

When using the Mermaid Live Editor, clicking the “Sample Diagrams” dropdown and selecting any sample immediately replaces the entire current diagram in the editor.

This happens:

  • Without any warning or confirmation dialog.

  • Without a way to undo or restore the previous diagram.

This leads to accidental data loss if a user clicks on a sample while working on an unsaved diagram.

Expected Behavior:

  • Prompt the user with a confirmation dialog

  • Or add an Undo functionality so users can restore the previous content after loading a sample

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions