Debian Codegraph @

demo/inline_autocompletion.html

raw
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>ACE Inline Autocompletion demo</title>
6 <style type="text/css" media="screen">
7 body {
8 overflow: hidden;
9 }
10
11 #editor {
12 margin: 0;
13 position: absolute;
14 top: 0;
15 bottom: 0;
16 left: 0;
17 right: 0;
18 }
19 </style>
20 </head>
21 <body>
22
23 <pre id="editor"></pre>
24
25 <script src="kitchen-sink/require.js"></script>
26 <script>
27 // setup paths
28 require.config({paths: { "ace" : "../src"}});
29 // load ace and extensions
30 require(["ace/ace", "ace/mode/javascript", "ace/ext/language_tools", "ace/ext/inline_autocomplete"], function(ace, codeLens) {
31 var editor = ace.edit("editor");
32 editor.session.setMode("ace/mode/javascript");
33 editor.setTheme("ace/theme/tomorrow");
34 // enable inline autocompletion
35 editor.setOptions({
36 enableBasicAutocompletion: false,
37 enableInlineAutocompletion: true,
38 enableSnippets: true,
39 enableLiveAutocompletion: false
40 });
41
42 window.editor = editor;
43 });
44 </script>
45
46 <script src="./show_own_source.js"></script>
47 </body>
48 </html>