Server IP : 15.235.198.142 / Your IP : 216.73.216.17 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/doc/libjs-codemirror/examples/ |
Upload File : |
<!doctype html> <title>CodeMirror: Ruler Demo</title> <meta charset="utf-8"/> <link rel=stylesheet href="../html/docs.css"> <link rel="stylesheet" href="/usr/share/javascript/codemirror/lib/codemirror.css"> <script src="/usr/share/javascript/codemirror/lib/codemirror.js"></script> <script src="/usr/share/javascript/codemirror/addon/display/rulers.js"></script> <style> .CodeMirror {border-top: 1px solid #888; border-bottom: 1px solid #888;} </style> <div id=nav> <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../html/logo.png"></a> <ul> <li><a href="../index.html">Home</a> <li><a href="../html/manual.html">Manual</a> <li><a href="https://github.com/codemirror/codemirror">Code</a> </ul> <ul> <li><a class=active href="#">Ruler demo</a> </ul> </div> <article> <h2>Ruler Demo</h2> <script> var nums = "0123456789", space = " "; var colors = ["#fcc", "#f5f577", "#cfc", "#aff", "#ccf", "#fcf"]; var rulers = [], value = ""; for (var i = 1; i <= 6; i++) { rulers.push({color: colors[i], column: i * 10, lineStyle: "dashed"}); for (var j = 1; j < i; j++) value += space; value += nums + "\n"; } var editor = CodeMirror(document.body.lastChild, { rulers: rulers, value: value + value + value, lineNumbers: true }); </script> <p>Demonstration of the <a href="../html/manual.html#addon_rulers">rulers</a> addon, which displays vertical lines at given column offsets.</p> </article>