Files

55 lines
1.4 KiB
HTML

<!doctype html>
<title>CodeMirror: YARA mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../theme/elegant.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="yara.js"></script>
<style>.CodeMirror {border:1px solid #999; background:#ffc}</style>
<div id=nav>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">YARA</a>
</ul>
</div>
<article>
<h2>YARA mode</h2>
<form>
<textarea id="code" name="code">
/* Demo YARA rule */
rule demo {
strings:
$foo = "foo" // foo
$bar = "bar" // bar
$cafebabe = {CAFEBABE} // cafebabe
condition:
all of them
}
</textarea>
</form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
theme: "elegant",
matchBrackets: true,
indentUnit: 8,
tabSize: 8,
indentWithTabs: true,
mode: "text/x-yara"
});
</script>
<p><strong>MIME type:</strong> <code>text/x-yara</code></p>
</article>