cleanup
This commit is contained in:
parent
d0d3ca2de8
commit
3c46895f8c
4 changed files with 64 additions and 62 deletions
3
demo/demo_helper.js
Normal file
3
demo/demo_helper.js
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
ace.require("ace/lib/net").get(document.baseURI, function(t){
|
||||||
|
editor.setValue(t, 1);
|
||||||
|
})
|
||||||
|
|
@ -42,7 +42,7 @@ body {
|
||||||
#controls td + td {
|
#controls td + td {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
#lineColIndicator {
|
.ace_status-indicator {
|
||||||
color: gray;
|
color: gray;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
|
||||||
|
|
@ -28,31 +28,30 @@
|
||||||
background-color: rgb(245, 245, 245);
|
background-color: rgb(245, 245, 245);
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
#statusbar#lineColIndicator {
|
.ace_status-indicator {
|
||||||
|
color: gray;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
border-left: 1px solid;
|
border-left: 1px solid;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<pre id="editor">
|
<pre id="editor"></pre>
|
||||||
var editor = ace.edit("editor");
|
|
||||||
var StatusBar = ace.require('ace/ext/statusbar').StatusBar;
|
|
||||||
var statusBar = new StatusBar(editor, document.getElementById('statusBar'));
|
|
||||||
editor.setTheme("ace/theme/twilight");
|
|
||||||
editor.getSession().setMode("ace/mode/javascript");
|
|
||||||
</pre>
|
|
||||||
<div id="statusBar">ace rocks!</div>
|
<div id="statusBar">ace rocks!</div>
|
||||||
|
|
||||||
<script src="../build/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
|
<script src="../build/src-noconflict/ace.js"></script>
|
||||||
<script src="../build/src-noconflict/ext-statusbar.js" type="text/javascript" charset="utf-8"></script>
|
<script src="../build/src-noconflict/ext-statusbar.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var editor = ace.edit("editor");
|
var editor = ace.edit("editor");
|
||||||
var StatusBar = ace.require('ace/ext/statusbar').StatusBar;
|
var StatusBar = ace.require('ace/ext/statusbar').StatusBar;
|
||||||
|
// create a simple selection status indicator
|
||||||
var statusBar = new StatusBar(editor, document.getElementById('statusBar'));
|
var statusBar = new StatusBar(editor, document.getElementById('statusBar'));
|
||||||
editor.setTheme("ace/theme/twilight");
|
editor.setTheme("ace/theme/dawn");
|
||||||
editor.getSession().setMode("ace/mode/javascript");
|
editor.session.setMode("ace/mode/html");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script src="./demo_helper.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ var lang = require("ace/lib/lang");
|
||||||
|
|
||||||
var StatusBar = function(editor, parentNode) {
|
var StatusBar = function(editor, parentNode) {
|
||||||
this.element = dom.createElement("div");
|
this.element = dom.createElement("div");
|
||||||
this.element.id = 'lineColIndicator';
|
this.element.className = "ace_status-indicator";
|
||||||
this.element.style.cssText = "display: inline-block;";
|
this.element.style.cssText = "display: inline-block;";
|
||||||
parentNode.appendChild(this.element);
|
parentNode.appendChild(this.element);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue