Mermaid Diagram

Posted by @galtenberg, Last update 15 days ago

Generate a mermaid.js diagram from current draft.

Steps

  • script

    const url = "https://mermaid.ink/img/".concat(Base64.encode(editor.getText()))
    
    const css = `
    <style>
    html, body { height: 100%; margin: 0; }
    img { 
      min-width: 100%; min-height: 100%;
      background: url(https://cdnjs.cloudflare.com/ajax/libs/galleriffic/2.0.1/css/loader.gif) no-repeat center;
    }
    </style>
    `
    
    HTMLPreview.create().show(`${css}<img src="${url}" />`)

Options

  • After Success Nothing
    Notification Error
    Log Level Error
Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.