File: keyboard_shortcuts.html

package info (click to toggle)
node-ace-code 1.40.1%2B~cs1.7.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,816 kB
  • sloc: javascript: 258,622; sh: 231; asm: 185; makefile: 130; xml: 85; jsp: 85; objc: 77; lisp: 52; cpp: 34; java: 34; tcl: 30; cobol: 30; pascal: 29; ruby: 27; vhdl: 25; fortran: 21; erlang: 17; python: 13; php: 12; perl: 11; haskell: 10; ml: 10; sql: 6; ada: 5; cs: 3
file content (51 lines) | stat: -rw-r--r-- 1,260 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!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"></pre>
    
<script src="kitchen-sink/require.js"></script>
<script>
// setup paths
require.config({paths: { "ace" : "../src"}});
require(["ace/ace"], function(ace) {
    var editor = ace.edit("editor")
    editor.setTheme("ace/theme/twilight")
    editor.session.setMode("ace/mode/html")
    
    // add command to lazy-load keybinding_menu extension
    editor.commands.addCommand({
        name: "showKeyboardShortcuts",
        bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
        exec: function(editor) {
            ace.config.loadModule("ace/ext/keybinding_menu", function(module) {
                module.init(editor);
                editor.showKeyboardShortcuts()
            })
        }
    })
    editor.execCommand("showKeyboardShortcuts")
})
</script>

<script src="./show_own_source.js"></script>
</body>
</html>