all repos — NoPaste @ 29b774f090102303e43cf939b38ac2083e62d9f1

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/cypher/index.html (view raw)

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