File modules/editor/codemirror/mode/cypher/index.html

Last commit: Sun Dec 17 01:14:09 2017 +0100	Jan Dankert	Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.
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="cypher.js"></script> 11 <style> 12 .CodeMirror { 13 border-top: 1px solid black; 14 border-bottom: 1px solid black; 15 } 16 </style> 17 <div id=nav> 18 <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> 19 20 <ul> 21 <li><a href="../../index.html">Home</a> 22 <li><a href="../../doc/manual.html">Manual</a> 23 <li><a href="https://github.com/codemirror/codemirror">Code</a> 24 </ul> 25 <ul> 26 <li><a href="../index.html">Language modes</a> 27 <li><a class=active href="#">Cypher Mode for CodeMirror</a> 28 </ul> 29 </div> 30 31 <article> 32 <h2>Cypher Mode for CodeMirror</h2> 33 <form> 34 <textarea id="code" name="code">// Cypher Mode for CodeMirror, using the neo theme 35 MATCH (joe { name: 'Joe' })-[:knows*2..2]-(friend_of_friend) 36 WHERE NOT (joe)-[:knows]-(friend_of_friend) 37 RETURN friend_of_friend.name, COUNT(*) 38 ORDER BY COUNT(*) DESC , friend_of_friend.name 39 </textarea> 40 </form> 41 <p><strong>MIME types defined:</strong> 42 <code><a href="?mime=application/x-cypher-query">application/x-cypher-query</a></code> 43 </p> 44 <script> 45 window.onload = function() { 46 var mime = 'application/x-cypher-query'; 47 // get mime type 48 if (window.location.href.indexOf('mime=') > -1) { 49 mime = window.location.href.substr(window.location.href.indexOf('mime=') + 5); 50 } 51 window.editor = CodeMirror.fromTextArea(document.getElementById('code'), { 52 mode: mime, 53 indentWithTabs: true, 54 smartIndent: true, 55 lineNumbers: true, 56 matchBrackets : true, 57 autofocus: true, 58 theme: 'neo' 59 }); 60 }; 61 </script> 62 63 </article>
Download modules/editor/codemirror/mode/cypher/index.html
History Sun, 17 Dec 2017 01:14:09 +0100 Jan Dankert Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.