Browse Source

trying ace editor

master
KaiSD 5 years ago
parent
commit
1bff1cb2d4
1 changed files with 29 additions and 0 deletions
  1. +29
    -0
      ace/index.html

+ 29
- 0
ace/index.html View File

@@ -0,0 +1,29 @@
<!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="/ace-builds/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/monokai");
editor.session.setMode("ace/mode/javascript");
</script>
</body>
</html>

Loading…
Cancel
Save