Created
October 21, 2013 09:46
-
-
Save ipeychev/7081314 to your computer and use it in GitHub Desktop.
ACE Editor in an iframe
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>ACE in Action</title> | |
<style type="text/css" media="screen"> | |
#editor { | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="editor">function foo(items) { | |
var x = "All this is syntax highlighted"; | |
return x; | |
}</div> | |
<script src="src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script> | |
<script> | |
var editor = ace.edit("editor"); | |
editor.setTheme("ace/theme/monokai"); | |
editor.getSession().setMode("ace/mode/javascript"); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment