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
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>ACE Autocompletion demo</title>
  <style type="text/css" media="screen">
    body {
        overflowhidden;
    }
    
    #editor { 
        margin0;
        positionabsolute;
        top0;
        bottom0;
        left0;
        right0;
    }
  </style>
</head>
<body>
<pre id="editor"></pre>
<!-- load ace -->
<script src="../src-noconflict/ace.js"></script>
<!-- load ace language tools -->
<script src="../src-noconflict/ext-language_tools.js"></script>
<script>
    // trigger extension
    ace.require("ace/ext/language_tools");
    var editor = ace.edit("editor");
    editor.session.setMode("ace/mode/html");
    editor.setTheme("ace/theme/tomorrow");
    // enable autocompletion and snippets
    editor.setOptions({
        enableBasicAutocompletion: true,
        enableSnippets: true,
        enableLiveAutocompletion: false
    });
</script>
<script src="./show_own_source.js"></script>
</body>
</html>
X