How to use the mermaid.version function in mermaid

To help you get started, we’ve selected a few mermaid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rogeruiz / scuttle / source / javascript / start.js View on Github external
import mermaid from 'mermaid';
import * as svgPng from 'save-svg-as-png';

console.log( 'mermaid', mermaid.version() );

// TODO This is very ugly, but for now it renders. This SVG creation should be
// done in the build step.
let ss = document.getElementById( 'js-stage' );
let btn = document.getElementById( 'save-png-button' );
btn.addEventListener('click', function() {
  let svgList = ss.getElementsByTagName('svg');
  let options = {
    scale: 2,
    backgroundColor: '#ffffff',
  };
  if (svgList.length) {
    svgPng.saveSvgAsPng(svgList[0], document.title+'.png', options);
  }
});
github mermaid-js / mermaid / test / usageTests / browserifyUsage.js View on Github external
/**
 * Created by knut on 14-12-02.
 */
mermaid = require('mermaid')

console.log('Test page! mermaid version' + mermaid.version())