Created
July 13, 2012 01:35
-
-
Save rufuscoder/3102197 to your computer and use it in GitHub Desktop.
This is what I put in my Web Editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This is an an implementation of ace. You will need three files for this to work. Located in Roffis-Site */ | |
<body> | |
<pre id="editor">function foo(items) { | |
var i; | |
for (i = 0; i < items.length; i++) { | |
alert("Ace Rocks " + items[i]); | |
} | |
}</pre> | |
<script src="src/ace.js" type="text/javascript" charset="utf-8"></script> | |
<script src="src/theme-twilight.js" type="text/javascript" charset="utf-8"></script> | |
<script src="src/mode-javascript.js" type="text/javascript" charset="utf-8"></script> | |
<script> | |
window.onload = function() { | |
var editor = ace.edit("editor"); | |
editor.setTheme("ace/theme/twilight"); | |
var JavaScriptMode = require("ace/mode/javascript").Mode; | |
editor.getSession().setMode(new JavaScriptMode()); | |
}; | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment