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

How to identify in the text where a node is #5068

Closed
ted-marozzi opened this issue Nov 25, 2023 · 3 comments
Closed

How to identify in the text where a node is #5068

ted-marozzi opened this issue Nov 25, 2023 · 3 comments
Labels
Close after 30 days Close issue if no response after 30 days Type: Question

Comments

@ted-marozzi
Copy link
Contributor

Description

Hi, I am the creator of an the ecosystem project Mermaid Flow.
Currently I am using the api getDiagramFromText to get information about the diagram, such as the current nodes and links ect. I wish to edit things about the nodes programatically, to do that I am using complex regexp matchers to find the node in the current text and modify it.

My question is, is there any internal api to, say from an node id, find the index of the diagram text where the node is written? Alternatively is there a way to programatically modify the diagram text such as changing node labels that will be reflected in the final diagram text?

Cheers.

Steps to reproduce

  1. Call getDiagramFromText
  2. Notice we can't manipulate the text the user has entered.

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

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 Nov 25, 2023
@sidharthv96
Copy link
Member

sidharthv96 commented Nov 25, 2023

Currently, we don't have that support :(
Something like this could possibly be added once we have Langium parsers for all the diagrams. But it's gonna be a while to get the bigger diagrams converted.

@sidharthv96 sidharthv96 added Type: Question Close after 30 days Close issue if no response after 30 days and removed Type: Bug / Error Something isn't working or is incorrect Status: Triage Needs to be verified, categorized, etc labels Nov 25, 2023
@ted-marozzi
Copy link
Contributor Author

Thanks, is Langium being rolled out to replace bison/jison? Can i track it somewhere?

@ted-marozzi
Copy link
Contributor Author

Gonna close this because we don't have immediate plans to support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close after 30 days Close issue if no response after 30 days Type: Question
Projects
None yet
Development

No branches or pull requests

2 participants