mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 04:44:08 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			786 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			786 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<html>
 | 
						|
  <script>
 | 
						|
    //      %%{ init: { "logLevel":0, "themeVariables" : { "primaryColor": "#fff000","textColor": "green","apa":"} #target { background-color: crimson }" } } }%%
 | 
						|
  </script>
 | 
						|
  <body>
 | 
						|
    <div id="target">
 | 
						|
      <h1>This element does not belong to the SVG but we can style it</h1>
 | 
						|
    </div>
 | 
						|
    <svg id="diagram"></svg>
 | 
						|
 | 
						|
    <script src="./mermaid.js"></script>
 | 
						|
    <script>
 | 
						|
      mermaid.initialize({ startOnLoad: false, logLevel: 0 });
 | 
						|
 | 
						|
      const graph = `
 | 
						|
     %%{ init: { "fontFamily" : "&125; * { background: red }" } }%%
 | 
						|
            graph TD
 | 
						|
                A[Goose]
 | 
						|
            `;
 | 
						|
 | 
						|
      const diagram = document.getElementById('diagram');
 | 
						|
      const svg = mermaid.render('diagram-svg', graph);
 | 
						|
      diagram.innerHTML = svg;
 | 
						|
    </script>
 | 
						|
  </body>
 | 
						|
</html>
 |