Debian Codegraph @

demo/statusbar.html

raw
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6 <title>ACE Editor StatusBar Demo</title>
7 <style type="text/css" media="screen">
8 body {
9 overflow: hidden;
10 }
11
12 #editor {
13 margin: 0;
14 position: absolute;
15 top: 0;
16 bottom: 20px;
17 left: 0;
18 right: 0;
19 }
20 #statusBar {
21 margin: 0;
22 padding: 0;
23 position: absolute;
24 left: 0;
25 right: 0;
26 bottom: 0;
27 height: 20px;
28 background-color: rgb(245, 245, 245);
29 color: gray;
30 }
31 .ace_status-indicator {
32 color: gray;
33 position: absolute;
34 right: 0;
35 border-left: 1px solid;
36 }
37 </style>
38 </head>
39 <body>
40
41 <pre id="editor"></pre>
42 <div id="statusBar">ace rocks!</div>
43
44 <script src="kitchen-sink/require.js"></script>
45 <script>
46 // setup paths
47 require.config({paths: { "ace" : "../src"}});
48 // load ace and extensions
49 require(["ace/ace", "ace/ext/statusbar"], function(ace) {
50 var editor = ace.edit("editor");
51 var StatusBar = require("ace/ext/statusbar").StatusBar;
52 // create a simple selection status indicator
53 var statusBar = new StatusBar(editor, document.getElementById("statusBar"));
54 editor.setTheme("ace/theme/dawn");
55 editor.session.setMode("ace/mode/html");
56 });
57 </script>
58
59 <script src="./show_own_source.js"></script>
60 </body>
61 </html>