window.callback = function () { alert('A callback was triggered'); }; const config = { startOnLoad: true, htmlLabels: true, flowchart: { useMaxWidth: true, curve: 'stepBefore' }, securityLevel: 'loose', }; mermaid.initialize(config);