1st version parsing for class diagrams, parsing draft completed, starting rendering work

This commit is contained in:
knsv
2015-10-29 07:49:08 +01:00
parent a694f61003
commit 01ddfea478
19 changed files with 1334 additions and 1041 deletions

View File

@@ -145,11 +145,16 @@ could be used. The example just logs the resulting svg to the javascript console
mermaidAPI.initialize({
startOnLoad:false
});
// Example of using the API
$(function(){
// Example of using the API
var element = document.querySelector("#graphDiv");
var insertSvg = function(svgCode, bindFunctions){
element.innerHTML = svgCode;
};
var graphDefinition = 'graph TB\na-->b';
var graph = mermaidAPI.render(graphDefinition);
$("#graphDiv").html(graph);
var graph = mermaidAPI.render('graphDiv', graphDefinition, insertSvg);
});
</script>
```