mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-10-31 10:54:15 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			817 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			817 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html>
 | |
|   <head>
 | |
|     <meta charset="utf-8" />
 | |
|     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
 | |
|     <title>Mermaid Quick Test Page</title>
 | |
|     <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
 | |
|   </head>
 | |
|   <body>
 | |
|     <div id="graph"></div>
 | |
| 
 | |
|     <script src="./mermaid.js"></script>
 | |
|     <script>
 | |
|       mermaid.init({ startOnLoad: false });
 | |
| 
 | |
|       mermaid.mermaidAPI.initialize({ securityLevel: 'strict' });
 | |
|       (async () => {
 | |
|         try {
 | |
|           console.log('rendering');
 | |
|           await mermaid.mermaidAPI.render('graphDiv', `>`);
 | |
|         } catch (e) {}
 | |
| 
 | |
|         await mermaid.mermaidAPI.render('graphDiv', `graph LR\n a --> b`, (html) => {
 | |
|           document.getElementById('graph').innerHTML = html;
 | |
|         });
 | |
|       })();
 | |
|     </script>
 | |
|   </body>
 | |
| </html>
 | 
