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

Expose the Diagram structure API #4172

Closed
ted-marozzi opened this issue Mar 2, 2023 · 0 comments · Fixed by #4174
Closed

Expose the Diagram structure API #4172

ted-marozzi opened this issue Mar 2, 2023 · 0 comments · Fixed by #4174
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@ted-marozzi
Copy link
Contributor

ted-marozzi commented Mar 2, 2023

Description

Hi,
I am building a graphical editor for mermaid js: www.mermaidflow.app/flowchart.

Users have expressed that they want to import mermaid js diagrams into it so that they can make edits visually and then reexport the diagram. To achieve this I would need to be able to parse the code and have an object returned that details the diagram structure. Currently the only api exposed is parse which returns a boolean but not quite the underlying Diagram.

Would you consider a new function that exposes this?

Steps to reproduce

As above this is a feature request but didn't fall into the categories mentioned.

Screenshots

No response

Code Sample

const diagram = parseDiagram(diagramCode);
// Diagram is an object the contains things like type as well as edges and nodes for the flowchart diagram for example.

Setup

Desktop

  • OS and Version: [Windows, Linux, Mac, ...]
  • Browser and Version: [Chrome, Edge, Firefox]

Smartphone

  • Device: [Samsung, iPhone, ...]
  • OS and Version: [Android, iOS, ...]
  • Browser and Version: [Chrome, Safari, ...]

Additional Context

No response

@ted-marozzi ted-marozzi added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant