|
| 1 | +<!doctype html> |
| 2 | + |
| 3 | +<title>CodeMirror: Mermaidmode</title> |
| 4 | +<meta charset="utf-8"/> |
| 5 | +<link rel=stylesheet href="../../doc/docs.css"> |
| 6 | + |
| 7 | +<link rel="stylesheet" href="../../lib/codemirror.css"> |
| 8 | +<script src="../../lib/codemirror.js"></script> |
| 9 | +<script src="../../addon/mode/simple.js"></script> |
| 10 | +<script src="mermaid.js"></script> |
| 11 | +<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> |
| 12 | +<div id=nav> |
| 13 | + <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a> |
| 14 | + |
| 15 | + <ul> |
| 16 | + <li><a href="../../index.html">Home</a> |
| 17 | + <li><a href="../../doc/manual.html">Manual</a> |
| 18 | + <li><a href="https://github.com/codemirror/codemirror">Code</a> |
| 19 | + </ul> |
| 20 | + <ul> |
| 21 | + <li><a href="../index.html">Language modes</a> |
| 22 | + <li><a class=active href="#">Dockerfile</a> |
| 23 | + </ul> |
| 24 | +</div> |
| 25 | + |
| 26 | +<article> |
| 27 | +<h2>Dockerfile mode</h2> |
| 28 | +<form><textarea id="code" name="code">sequenceDiagram |
| 29 | + participant Alice |
| 30 | + participant Bob |
| 31 | + Alice->>John: Hello John, how are you? |
| 32 | + loop Healthcheck |
| 33 | + John->>John: Fight against hypochondria |
| 34 | + end |
| 35 | + Note right of John: Rational thoughts <br/>prevail! |
| 36 | + John-->>Alice: Great! |
| 37 | + John->>Bob: How about you? |
| 38 | + Bob-->>John: Jolly good! |
| 39 | +</textarea></form> |
| 40 | + |
| 41 | + <script> |
| 42 | + var editor = CodeMirror.fromTextArea(document.getElementById("code"), { |
| 43 | + lineNumbers: true, |
| 44 | + mode: "mermaid" |
| 45 | + }); |
| 46 | + </script> |
| 47 | + |
| 48 | + <p>Mermaid syntax highlighting for CodeMirror. Depends on |
| 49 | + the <a href="../../demo/simplemode.html">simplemode</a> addon.</p> |
| 50 | + |
| 51 | + <p><strong>MIME types defined:</strong> <code>text/x-mermaid</code></p> |
| 52 | + </article> |
0 commit comments