5 <title>CodeMirror: Visible tabs demo</title>
6 <link rel="stylesheet" href="../lib/codemirror.css">
7 <script src="../lib/codemirror.js"></script>
8 <script src="../mode/clike/clike.js"></script>
9 <link rel="stylesheet" href="../doc/docs.css">
11 <style type="text/css">
12 .CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee;}
14 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
15 background-position: right;
16 background-repeat: no-repeat;
21 <h1>CodeMirror: Visible tabs demo</h1>
23 <form><textarea id="code" name="code">
25 /* getchar: simple buffered version */
28 static char buf[BUFSIZ];
29 static char *bufp = buf;
31 if (n == 0) { /* buffer is empty */
32 n = read(0, buf, sizeof buf);
35 return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
39 <p>Tabs inside the editor are spans with the
40 class <code>cm-tab</code>, and can be styled.</p>
43 var editor = CodeMirror.fromTextArea(document.getElementById("code"), {