Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get mermaidAPI? #617

Closed
lth946965333 opened this issue Jan 25, 2018 · 3 comments
Closed

how to get mermaidAPI? #617

lth946965333 opened this issue Jan 25, 2018 · 3 comments

Comments

@lth946965333
Copy link

i use <script src="mermaidAPI.js"></script> ,and i have this file ,but when i open the html , it tell me ReferenceError: mermaidAPI is not defined
this is my code

graph LR id1(行号) --> id2(指令名称) id2(指令名称) --> id3(加载) id3(加载) --> id4(就绪) id4(就绪) --> id5(发送) id5(发送) --> id6(发送时间);
<script src="mermaidAPI.js"></script> <script> mermaidAPI.initialize({ startOnLoad:false }); $(function(){ // Example of using the API var element = document.querySelector("#graphDiv"); var svgCode = "style id1 fill:#fff,stroke:#333,stroke-width:4px" var insertSvg = function(svgCode, bindFunctions){ element.innerHTML = svgCode; }; var graphDefinition = 'graph TB\na-->b'; var graph = mermaidAPI.render('graphDiv', graphDefinition, insertSvg); }); </script>
@tylerlong
Copy link
Collaborator

Please take this file as example for how to use mermaid in a static HTML page: https://github.com/knsv/mermaid/blob/master/dist/index.html

@zxzzxxzx
Copy link

So the usage of mermaidAPI is deprecated? Everything should be done through regular mermaid,js file? After executing

yarn build:watch

mermaidAPI.js is not generated in dist folder

@apavlyut
Copy link

So the usage of mermaidAPI is deprecated? Everything should be done through regular mermaid,js file? After executing

yarn build:watch

mermaidAPI.js is not generated in dist folder

call

mermaid.mermaidAPI

mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.4 to 9.2.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](mochajs/mocha@v9.1.4...v9.2.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants