-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Execute code after initialize #176
Comments
Good idea! Perhaps a callback method as an optional parameter to mermaid.init could do the trick. |
Cool! Works well! |
I can't get it to work with Mermaid 7.1.2 (https://unpkg.com/[email protected]/dist/mermaid.min.js).
Demo with old version: https://unpkg.com/[email protected]/test/web.html |
I had the same problem and after looking at the source I go it to work like this:
|
Ir seems nice but on version 8+ there's no types that support such implementation :/ |
Is there any doc/news from this ? |
@Andromelus I found some content in the changelog. Looks like you can do the following in >= 10: <script type="module" async>
import mermaid from '${src}';
mermaid.run({
querySelector: '.mermaid',
postRenderCallback: (id) => {
console.log(id);
}
});
</script> |
@BigBlueHat This works. Thanks for sharing. |
I need to add tooltips to nodes. I want to use 'tipsy' library (like this http://bl.ocks.org/ilyabo/1373263), but it is called before real svg nodes are created. How to call my code AFTER mermaid finished?
The text was updated successfully, but these errors were encountered: