Fix: merge conflict
[myslice.git] / third-party / codemirror-3.15 / demo / matchhighlighter.html
1 <!doctype html>
2 <html>
3   <head>
4     <meta charset="utf-8">
5     <title>CodeMirror: Match Highlighter Demo</title>
6     <link rel="stylesheet" href="../lib/codemirror.css">
7     <script src="../lib/codemirror.js"></script>
8     <script src="../addon/search/searchcursor.js"></script>
9     <script src="../addon/search/match-highlighter.js"></script>
10     <link rel="stylesheet" href="../doc/docs.css">
11
12     <style type="text/css">
13       .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
14       .CodeMirror-focused .cm-matchhighlight {
15         background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);
16         background-position: bottom;
17         background-repeat: repeat-x;
18       }
19     </style>
20   </head>
21   <body>
22     <h1>CodeMirror: Match Highlighter Demo</h1>
23
24     <form><textarea id="code" name="code">Select this text: hardToSpotVar
25         And everywhere else in your code where hardToSpotVar appears will automatically illuminate.
26 Give it a try!  No more hardToSpotVars.</textarea></form>
27
28     <script>
29 var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
30   lineNumbers: true,
31   highlightSelectionMatches: {showToken: /\w/}
32 });
33 </script>
34
35     <p>Search and highlight occurences of the selected text.</p>
36
37   </body>
38 </html>