mermaid without browser
See original GitHub issueI want to do it in pure node.js:
var mermaidAPI = require('mermaid').mermaidAPI;
var graphDefinition = 'graph TB\na-->b';
var graph = mermaidAPI.render(graphDefinition);
console.log(graph);
Currently it is not possible: https://github.com/knsv/mermaid/blob/master/src/mermaidAPI.js#L486
if (typeof document === ‘undefined’) { // Todo handle rendering serverside using phantomjs }
Issue Analytics
- State:
- Created 8 years ago
- Reactions:6
- Comments:10
Top Results From Across the Web
mermaid without browser · Issue #260
I want to do it in pure node.js: var mermaidAPI = require('mermaid').mermaidAPI; var graphDefinition = 'graph TB\na-->b'; ...
Read more >Mermaid Live Editor: Online FlowChart & Diagrams Editor
Simplify documentation and avoid heavy tools. Open source Visio Alternative. Commonly used for explaining your code! Mermaid is a simple markdown-like ...
Read more >Mermaid | Diagramming and charting tool
JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically.
Read more >Rendering Mermaid Charts - Markdown Monster Documentation
Refresh the Browser (f5 or Refresh Browser from context Menu); Activate another tab then back to the tab with Mermaid; Enable the ...
Read more >Building C4 Diagrams in Mermaid
No need for a separate rendering service, all done in browser. Drawbacks: Inflexibility in the styling and layout of Mermaid generated diagrams ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It’s not about the issue, but i made a webpack loader that helps to generate PNG files from mermaid diagrams. https://github.com/popul/mermaid-loader
It can help 😃
Hi, can this issue be reopened? Puppeteer too launches a headless chrome instance in the background.