NAV

mermaidAPI

This is the api to be used when handling the integration with the web page instead of using the default integration
(mermaid.js).

The core of this api is the render function that given a graph definitionas text renders the graph/diagram and
returns a svg element for the graph. It is is then up to the user of the API to make use of the svg, either insert it
somewhere in the page or something completely different.

Configuration

These are the default options which can be overridden with the initialization call as in the example below:

mermaid.initialize({
  flowchart:{
     htmlLabels: false
  }
});

logLevel , decides the amount of logging to be used.

mermaidAPI.initialize({
     startOnLoad:true
 });
 $(function(){
     var graphDefinition = 'graph TB\na-->b';
     var cb = function(svgGraph){
         console.log(svgGraph);
     };
     mermaidAPI.render('id1',graphDefinition,cb);
 });