Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is there a way to get an export from excalidraw to mermaid? #66

Open
danieltome opened this issue May 28, 2024 · 14 comments
Open

Comments

@danieltome
Copy link

I've tried searching but can't find anything available. Do you know if there's a way to do excalidraw to mermaid?

@chiefkana
Copy link

Same thing here!

@ad1992
Copy link
Member

ad1992 commented May 30, 2024

No, currently there is no way to convert from Excalidraw to Mermaid.
Could you please share the scenarios where you would need this feature?

@chiefkana
Copy link

Most of My Company's frontend documentation is based on drawings made in excalidraw, as of now we are migrating to customizable mermaid snippets in frontends wiki, so the question appeared. If it is not a case as of now, will be happy to work on it.

@DenFin
Copy link

DenFin commented Jul 25, 2024

This would be incredibly helpful. I'm interested in this as well but wouldn't know where to start honestly

@ad1992
Copy link
Member

ad1992 commented Jul 30, 2024

On a high-level overview, I think this is doable as we need to identify mainly the nodes, edges, and text and start constructing the mermaid syntax based on that.
However, one of the main challenges could be to port to the correct type of mermaid diagram and for that, if we start storing mermaidType in the converted excalidraw diagrams then that would become easier.

@kheerand
Copy link

kheerand commented Aug 1, 2024

+1 for this feature.

My use-case:

I have lots of systems diagrams in Excalidraw, and use it for analysis of complex systems. I am interested in harnessing the power of AI, to look across multiple systems diagrams and gain new insights. Mermaid is ideal for AI models to understand the systems, Excalidraw is excellent for humans to explore the systems. So, being able to go from one to the other would be fantastic and reduce the errors I currently have in getting AI vision systems to try and recreate the Excalidraw diagram in Mermaid.

@bselwayregis
Copy link

This is pretty much exactly my use case as well ☝️

@jpetrantoni
Copy link

+1 on this

I think theres too many edge cases for it to be officially supported. The best bet might to use the outputted json to reconstruct it.

@YokiToki
Copy link

In my opinion, the main problem is that arrows don't have a start and end binding to a generic element, sometimes they have a text binding, but that's not necessary. As a result, we end up with sets of linear, generic, and text elements unrelated to each other. The only point of reference is the positioning and size of the element.

@YokiToki
Copy link

Hi everyone! I have tried to implement excalidraw to mermaid conversion. This only works well for .excalidraw files that are created from .mermaid imports or manually properly customized arrows. For most cases it doesn't work for the moment. I'd be happy if anyone decides to contribute. https://github.com/YokiToki/excalidraw-to-mermaid

@dudido
Copy link

dudido commented Oct 8, 2024

I came here looking for an answer to that question. Mermaid is natively supported across various platforms like Notion

@mjga-trifork
Copy link

Personally I have a similar use case. I like drawing stuff in Excalidraw, not so much in mermaid, but we use mermaid in github readmes so the diagrams are versioned. So initially drawing a diagram and exporting it to mermaid would be nice.

As a workaround one can feed the Excalidraw diagram to ChatGPT and ask it to convert it to a mermaid diagram. It's not perfect, but it gives you a starting point.

@Lunatix01
Copy link

Personally I have a similar use case. I like drawing stuff in Excalidraw, not so much in mermaid, but we use mermaid in github readmes so the diagrams are versioned. So initially drawing a diagram and exporting it to mermaid would be nice.

As a workaround one can feed the Excalidraw diagram to ChatGPT and ask it to convert it to a mermaid diagram. It's not perfect, but it gives you a starting point.

I have a similar use case to yours, hopefully, we will see that feature.

@chuck00lin
Copy link

+1 on this, it will be nice feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests