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

This commit is contained in:
2019-09-03 11:44:10 +02:00
parent cb47240a80
commit 5191acd5a6

View File

@@ -1,29 +1,39 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>ACE in Action</title> <meta charset="UTF-8">
<style type="text/css" media="screen"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
#editor { #editor {
margin: 0;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0;
} }
</style> </style>
</head> </head>
<body> <body>
<div id="editor">function foo(items) { <pre id="editor">function foo(items) {
var x = "All this is syntax highlighted"; var i;
return x; for (i = 0; i &lt; items.length; i++) {
}</div> alert("Ace Rocks " + items[i]);
}
}</pre>
<script src="/ace-builds/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script> <script src="src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script> <script>
var editor = ace.edit("editor"); var editor = ace.edit("editor");
editor.setTheme("ace/theme/monokai"); editor.setTheme("ace/theme/twilight");
editor.session.setMode("ace/mode/javascript"); editor.session.setMode("ace/mode/javascript");
</script> </script>
</body> </body>
</html> </html>