adds demo show_keyboard_shortcuts
This commit is contained in:
parent
d531866663
commit
f5500fefc4
1 changed files with 41 additions and 0 deletions
41
demo/show_keyboard_shortcuts.html
Normal file
41
demo/show_keyboard_shortcuts.html
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<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;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<pre id="editor">function foo(items) {
|
||||||
|
var i;
|
||||||
|
for (i = 0; i < items.length; i++) {
|
||||||
|
alert("Ace Rocks " + items[i]);
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
|
||||||
|
<script src="../build/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script src="../build/src-noconflict/ext-show_keyboard_shortcuts.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
<script>
|
||||||
|
ace.require('ace/ext/show_keyboard_shortcuts');
|
||||||
|
var editor = ace.edit("editor");
|
||||||
|
editor.setTheme("ace/theme/twilight");
|
||||||
|
editor.getSession().setMode("ace/mode/javascript");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue