Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ <h2><a id="Library"></a>Library</h2>
should use in production. During development, if you wish to change mxGraph
sources, use the bootstrapped <a href="https://github.com/jgraph/mxgraph/blob/master/javascript/src/js/mxClient.js"><code>mxClient.js</code></a> file.
</p>

<p><u>Adding Mermaid for Diagrams</u></p>

<p>
To enhance your project with diagramming capabilities, you can include the
<a href="https://mermaid-js.github.io/mermaid/">mermaid</a> library.
This library allows you to easily create diagrams and flowcharts.
</p>
<pre>
&lt;script type="text/javascript" src="javascript/mermaid.min.js"&gt;&lt;/script&gt;
</pre>
<p>
Now, you can use the mermaid library in your project along with mxGraph.
Feel free to explore the mermaid documentation for usage and examples.
</p>
<h2><a id="BrowserCheck"></a>Browser Check</h2>
<p>
The next script tag in the HEAD part of the page contains the
Expand Down
40 changes: 40 additions & 0 deletions javascript/mermaid.min.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ export default {
format: 'cjs',
strict: false,
plugins: [terser()]
}
},
{
file: 'javascript/mermaid.min.js',
format: 'cjs',
strict: false,
},
],
plugins: [handleDependencies()],
treeshake: false
Expand Down