5 <title>CodeMirror: HTML completion demo</title>
6 <link rel="stylesheet" href="../lib/codemirror.css">
7 <script src="../lib/codemirror.js"></script>
8 <script src="../addon/hint/show-hint.js"></script>
9 <link rel="stylesheet" href="../addon/hint/show-hint.css">
10 <script src="../addon/hint/xml-hint.js"></script>
11 <script src="../addon/hint/html-hint.js"></script>
12 <script src="../mode/xml/xml.js"></script>
13 <script src="../mode/javascript/javascript.js"></script>
14 <script src="../mode/css/css.js"></script>
15 <script src="../mode/htmlmixed/htmlmixed.js"></script>
17 <link rel="stylesheet" href="../doc/docs.css">
18 <style type="text/css">
19 .CodeMirror {border-top: 1px solid #888; border-bottom: 1px solid #888;}
24 <h1>HTML completion demo</h1>
25 <p>Shows the <a href="xmlcomplete.html">XML completer</a>
26 parameterized with information about the tags in HTML.
27 Press <strong>ctrl-space</strong> to activate completion.</p>
31 <script type="text/javascript">
32 CodeMirror.commands.autocomplete = function(cm) {
33 CodeMirror.showHint(cm, CodeMirror.hint.html);
35 window.onload = function() {
36 editor = CodeMirror(document.getElementById("code"), {
38 extraKeys: {"Ctrl-Space": "autocomplete"},
39 value: "<!doctype html>\n<html>\n " + document.documentElement.innerHTML + "\n</html>"