-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy patheditor.html
More file actions
77 lines (70 loc) · 2.73 KB
/
Copy patheditor.html
File metadata and controls
77 lines (70 loc) · 2.73 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css" media="screen">
#editor {
line-height: 1.4em;
font-family:"Menlo";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
div.ace_scrollbar{
-webkit-transition:opacity, 0.333s;
opacity:0!important;
}
#editor.scrolling-v div.ace_scrollbar-v{
opacity:1!important;
}
#editor.scrolling-h div.ace_scrollbar-h{
opacity:1!important;
}
div.ace_scrollbar-v{ right:2px!important; bottom:3px!important; top:3px!important;}
div.ace_scrollbar-h{ right:4px!important; bottom:3px!important;}
div.ace_scrollbar-v::-webkit-scrollbar {width: 0.48em;}
div.ace_scrollbar-h::-webkit-scrollbar {height: 0.48em;}
div.ace_scrollbar::-webkit-scrollbar-thumb {
color:transparent;
background: rgba(80, 80, 80, 0.6);
border-radius:.48em;
box-shadow: inset 0 0 6px rgba(80, 80, 80, 0.3);
}
#editor.ace_dark div.ace_scrollbar-v{ right:3px!important; bottom:3px!important; top:3px!important;}
#editor.ace_dark div.ace_scrollbar-h{ right:4px!important; bottom:3px!important;}
#editor.ace_dark div.ace_scrollbar-v::-webkit-scrollbar {width: 0.3em;}
#editor.ace_dark div.ace_scrollbar-h::-webkit-scrollbar {height: 0.3em;}
#editor.ace_dark div.ace_scrollbar::-webkit-scrollbar-thumb {
color:transparent;
background: rgba(255, 255, 255, 0.5);
border-radius:.2em;
box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.3);
}
</style>
<script src="js/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ace/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>
<script src="js/keybindings.js" type="text/javascript" charset="utf-8"></script>
<script src="js/editor.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="autocomplete.css">
</head>
<body>
<div id="editor"></div>
<script>
document.addEventListener('DOMContentLoaded', () => {
// initialize ace
window.editor = Editor("#editor")
console.log('ED', editor)
// intercept opt-tab before the webview uses it for ill
function option_tab(e){
if (e.altKey && e.which==9){
editor.exec('startAutocomplete')
e.stopPropagation()
e.preventDefault()
}
}
document.querySelector('body').addEventListener('keydown', option_tab, true)
})
</script>
</body>
</html>