- Notifications
You must be signed in to change notification settings - Fork 5k
/
Copy pathhtml5complete.html
56 lines (48 loc) · 1.69 KB
/
html5complete.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!doctype html>
<head>
<title>CodeMirror: HTML completion demo</title>
<metacharset="utf-8"/>
<linkrel=stylesheethref="../doc/docs.css">
<linkrel="stylesheet" href="../lib/codemirror.css">
<linkrel="stylesheet" href="../addon/hint/show-hint.css">
<scriptsrc="../lib/codemirror.js"></script>
<scriptsrc="../addon/hint/show-hint.js"></script>
<scriptsrc="../addon/hint/xml-hint.js"></script>
<scriptsrc="../addon/hint/html-hint.js"></script>
<scriptsrc="../mode/xml/xml.js"></script>
<scriptsrc="../mode/javascript/javascript.js"></script>
<scriptsrc="../mode/css/css.js"></script>
<scriptsrc="../mode/htmlmixed/htmlmixed.js"></script>
<style>
.CodeMirror {border-top:1px solid #888; border-bottom:1px solid #888;}
</style>
</head>
<body>
<divid=nav>
<ahref="https://codemirror.net/5"><h1>CodeMirror</h1><imgid=logosrc="../doc/logo.png"></a>
<ul>
<li><ahref="../index.html">Home</a>
<li><ahref="../doc/manual.html">Manual</a>
<li><ahref="https://github.com/codemirror/codemirror5">Code</a>
</ul>
<ul>
<li><aclass=activehref="#">HTML completion</a>
</ul>
</div>
<article>
<h2>HTML completion demo</h2>
<p>Shows the <ahref="xmlcomplete.html">XML completer</a>
parameterized with information about the tags in HTML.
Press <strong>ctrl-space</strong> to activate completion.</p>
<divid="code"></div>
<script>
window.onload=function(){
editor=CodeMirror(document.getElementById("code"),{
mode: "text/html",
extraKeys: {"Ctrl-Space": "autocomplete"},
value: document.documentElement.innerHTML
});
};
</script>
</article>
</body>