mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-11 19:39:43 +02:00
Merge pull request #1140 from jdavis61/docs/1124_incorrect_include
Removed docs reference to mermaidAPI.js
This commit is contained in:
@@ -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
|
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.
|
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
|
The example below show an outline of how this could be used. The example just logs the resulting svg to the javascript console.
|
||||||
could be used. The example just logs the resulting svg to the javascript console.
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="mermaidAPI.js"></script>
|
<script src="mermaid.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
mermaidAPI.initialize({
|
mermaid.mermaidAPI.initialize({
|
||||||
startOnLoad:false
|
startOnLoad:false
|
||||||
});
|
});
|
||||||
$(function(){
|
$(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 graphDefinition = 'graph TB\na-->b';
|
||||||
var graph = mermaidAPI.render('graphDiv', graphDefinition, insertSvg);
|
var graph = mermaid.mermaidAPI.render('graphDiv', graphDefinition, insertSvg);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user