瀏覽代碼

Изменить 'ace/index.html'

master
KaiSD 5 年之前
父節點
當前提交
5191acd5a6
共有 1 個文件被更改,包括 22 次插入12 次删除
  1. +22
    -12
      ace/index.html

+ 22
- 12
ace/index.html 查看文件

@@ -1,29 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ACE in Action</title>
<style type="text/css" media="screen">
#editor {
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}

#editor {
margin: 0;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</style>
</head>
<body>

<div id="editor">function foo(items) {
var x = "All this is syntax highlighted";
return x;
}</div>
<script src="/ace-builds/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<pre id="editor">function foo(items) {
var i;
for (i = 0; i &lt; items.length; i++) {
alert("Ace Rocks " + items[i]);
}
}</pre>

<script src="src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/monokai");
editor.setTheme("ace/theme/twilight");
editor.session.setMode("ace/mode/javascript");
</script>

</body>
</html>

Loading…
取消
儲存