mermaid-js / mermaid-live-editor

Edit, preview and share mermaid charts/diagrams. New implementation of the live editor.
https://mermaid.live
MIT License
3.81k stars 574 forks source link

Clear diagram, or plain text editor #1403

Open Zorakie opened 4 months ago

Zorakie commented 4 months ago

So I am used to work on the go, = from a phone. I am using Opera with desktop site setting.

Problem: Mermaid automatically loads previous diagram from local storage, and there seems to be no option to disable that. There is no button to Clear diagram and start from scratch.

Why it is important? The code editor is not a native element, so whenever you try to focus cursor somewhere, the zoom freaks out. Selecting all by long tap also does not work... abd the zoom freaks out.

So the workflow looks like this: You let e.g. AI to generate the diagram. You open Mermaid. You fight with the editor for like 10 minutes trying to delete everything to paste your new diagram. You give up.

There is no console command to select all and delete as well. Mobile view (to fight the zoom) is broken as mermaid seems not to be optimized for mobiles at all

The request is as follows: Either: 1) start always with a clear canvas, do not automatically load previous session data or 2)Add a Clear all button or 3) Allow us to switch to plain textarea element

Thank you!

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days