| 776 |
lars |
1 |
<!doctype html>
|
|
|
2 |
<title>CodeMirror: Cypher Mode for CodeMirror</title>
|
|
|
3 |
<meta charset="utf-8" />
|
|
|
4 |
<link rel=stylesheet href="../../doc/docs.css">
|
|
|
5 |
<link rel="stylesheet" href="../../lib/codemirror.css" />
|
|
|
6 |
<link rel="stylesheet" href="../../theme/neo.css" />
|
|
|
7 |
<script src="../../lib/codemirror.js"></script>
|
|
|
8 |
<script src="cypher.js"></script>
|
|
|
9 |
<style>
|
|
|
10 |
.CodeMirror {
|
|
|
11 |
border-top: 1px solid black;
|
|
|
12 |
border-bottom: 1px solid black;
|
|
|
13 |
}
|
|
|
14 |
</style>
|
|
|
15 |
<div id=nav>
|
|
|
16 |
<a href="http://codemirror.net">
|
|
|
17 |
<h1>CodeMirror</h1>
|
|
|
18 |
<img id=logo src="../../doc/logo.png">
|
|
|
19 |
</a>
|
|
|
20 |
<ul>
|
|
|
21 |
<li>
|
|
|
22 |
<a href="../../index.html">Home</a>
|
|
|
23 |
<li>
|
|
|
24 |
<a href="../../doc/manual.html">Manual</a>
|
|
|
25 |
<li>
|
|
|
26 |
<a href="https://github.com/codemirror/codemirror">Code</a>
|
|
|
27 |
</ul>
|
|
|
28 |
<ul>
|
|
|
29 |
<li>
|
|
|
30 |
<a href="../index.html">Language modes</a>
|
|
|
31 |
<li>
|
|
|
32 |
<a class=active href="#">Cypher Mode for CodeMirror</a>
|
|
|
33 |
</ul>
|
|
|
34 |
</div>
|
|
|
35 |
<article>
|
|
|
36 |
<h2>Cypher Mode for CodeMirror</h2>
|
|
|
37 |
<form>
|
|
|
38 |
<textarea id="code" name="code">// Cypher Mode for CodeMirror, using the neo theme MATCH (joe { name: 'Joe' })-[:knows*2..2]-(friend_of_friend) WHERE NOT (joe)-[:knows]-(friend_of_friend) RETURN friend_of_friend.name, COUNT(*) ORDER BY COUNT(*) DESC , friend_of_friend.name </textarea>
|
|
|
39 |
</form>
|
|
|
40 |
<p>
|
|
|
41 |
<strong>MIME types defined:</strong> <code><a href="?mime=application/x-cypher-query">application/x-cypher-query</a></code> </p>
|
|
|
42 |
<script>
|
|
|
43 |
window.onload = function()
|
|
|
44 |
{
|
|
|
45 |
var mime = 'application/x-cypher-query';
|
|
|
46 |
// get mime type
|
|
|
47 |
if (window.location.href.indexOf('mime=') > -1)
|
|
|
48 |
{
|
|
|
49 |
mime = window.location.href.substr(window.location.href.indexOf('mime=') + 5);
|
|
|
50 |
}
|
|
|
51 |
window.editor = CodeMirror.fromTextArea(document.getElementById('code'),
|
|
|
52 |
{
|
|
|
53 |
mode: mime,
|
|
|
54 |
indentWithTabs: true,
|
|
|
55 |
smartIndent: true,
|
|
|
56 |
lineNumbers: true,
|
|
|
57 |
matchBrackets: true,
|
|
|
58 |
autofocus: true,
|
|
|
59 |
theme: 'neo'
|
|
|
60 |
});
|
|
|
61 |
};
|
|
|
62 |
</script>
|
|
|
63 |
</article>
|