![]() ![]() Var element = document.Mermaid JS is a library for building Diagrams as Code, similar to PlantUML. The example just logs the resulting svg to the javascript console. The example below show an outline of how thisĬould be used. To do this, include mermaidAPI on your web website instead of mermaid.js. With this approach it is up to the site creator toįetch the graph definition from the site, perhaps from a textarea, render it and place the graph somewhere in the site. Will render the graph and call a callback with the resulting svg code. The main idea with the API is to be able to call a render function with graph defintion as a string. Us the created bundle on a web page as per example below: Minimalistic javascript: mermaid = require('mermaid') Ĭonsole.log('Test page! mermaid version'+mermaid.version()) The reader is assumed to know about CommonJS style of module handling and how to use browserify. yetAnotherClass")) This type of integration is deprecated instead the preferred way of handling more complex integration is to us the mermaidAPI instead. Or with no config object, and a jQuery selection: mermaid.init(undefined, $("#someId.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |