Merge pull request #1140 from jdavis61/docs/1124_incorrect_include

Removed docs reference to mermaidAPI.js
This commit is contained in:
Knut Sveidqvist 2019-12-23 08:56:40 +01:00 committed by GitHub
commit c8f59ea1a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,14 +159,13 @@ The main idea of the API is to be able to call a render function with the graph
will render the graph and call a callback with the resulting svg code. With this approach it is up to the site creator to
fetch the graph definition from the site (perhaps from a textarea), render it and place the graph somewhere in the site.
To do this, include mermaidAPI on your web website instead of mermaid.js. The example below show an outline of how this
could be used. The example just logs the resulting svg to the javascript console.
The example below show an outline of how this could be used. The example just logs the resulting svg to the javascript console.
```html
<script src="mermaidAPI.js"></script>
<script src="mermaid.js"></script>
<script>
mermaidAPI.initialize({
mermaid.mermaidAPI.initialize({
startOnLoad:false
});
$(function(){
@ -178,7 +177,7 @@ could be used. The example just logs the resulting svg to the javascript console
};
var graphDefinition = 'graph TB\na-->b';
var graph = mermaidAPI.render('graphDiv', graphDefinition, insertSvg);
var graph = mermaid.mermaidAPI.render('graphDiv', graphDefinition, insertSvg);
});
</script>
```