comparison .cms/lib/codemirror/demo/trailingspace.html @ 0:78edf6b517a0 draft

24.10
author Coffee CMS <info@coffee-cms.ru>
date Fri, 11 Oct 2024 22:40:23 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:78edf6b517a0
1 <!doctype html>
2
3 <title>CodeMirror: Trailing Whitespace Demo</title>
4 <meta charset="utf-8"/>
5 <link rel=stylesheet href="../doc/docs.css">
6
7 <link rel="stylesheet" href="../lib/codemirror.css">
8 <script src="../lib/codemirror.js"></script>
9 <script src="../addon/edit/trailingspace.js"></script>
10 <style>
11 .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
12 .cm-trailingspace {
13 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);
14 background-position: bottom left;
15 background-repeat: repeat-x;
16 }
17 </style>
18 <div id=nav>
19 <a href="https://codemirror.net/5"><h1>CodeMirror</h1><img id=logo src="../doc/logo.png"></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/codemirror5">Code</a>
25 </ul>
26 <ul>
27 <li><a class=active href="#">Trailing Whitespace</a>
28 </ul>
29 </div>
30
31 <article>
32 <h2>Trailing Whitespace Demo</h2>
33 <form><textarea id="code" name="code">This text
34 has some
35 trailing whitespace!</textarea></form>
36
37 <script>
38 var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
39 lineNumbers: true,
40 showTrailingSpace: true
41 });
42 </script>
43
44 <p>Uses
45 the <a href="../doc/manual.html#addon_trailingspace">trailingspace</a>
46 addon to highlight trailing whitespace.</p>
47
48 </article>