Replies: 2 comments 2 replies
-
That would be ideal, but afaik, the lot of calculations rely on proper DOM, that's why we're unable to do server side rendering too. I'm doing the following in live editor. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would it be good to either modify the existing
render
andrenderAsync
functions to allow pure "definition in, SVG out" functionality without touching the DOM, or introduce new functions specifically for this. Eg.process
andprocessAsync
?I'm currently trying to use the mermaidAPI in a similar way to the API Usage section of the docs. But I'm finding myself in the situation where the mermaidAPI and frontend framework I'm using are fighting to update the DOM. (Vue in this case)
I would like to just supply the graph definition to mermaid's
render
orrenderAsync
functions, receive the SVG definition from the callback or resolved promise, then use the frontend framework's tools to manually patch the DOM.I could then watch for changes in the graph definition and repeat the above automatically.
Because mermaidAPI tries to remove and re-add the SVG elements itself, it makes it difficult to retain control over the DOM.
Beta Was this translation helpful? Give feedback.
All reactions