added exit shortcut for codemirror
This commit is contained in:
parent
ef60a24535
commit
f69653a0a9
3 changed files with 6 additions and 0 deletions
|
|
@ -5,3 +5,4 @@ me="$(dirname $(readlink -f $0))"
|
||||||
file="$(readlink -f "$1")"
|
file="$(readlink -f "$1")"
|
||||||
|
|
||||||
$me/codemirror.js "$file"
|
$me/codemirror.js "$file"
|
||||||
|
echo "press ctrl-X to exit editor"
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,11 @@ AFRAME.registerComponent('codemirror', {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.editor.setOption("theme", "shadowfox")
|
this.editor.setOption("theme", "shadowfox")
|
||||||
|
this.editor.setOption("extraKeys", {
|
||||||
|
"Ctrl-X": (cm) => {
|
||||||
|
this.el.emit('close',true) // window.js will react accordingly
|
||||||
|
}
|
||||||
|
})
|
||||||
this.editor.updateFile = AFRAME.utils.throttle( (file,str) => {
|
this.editor.updateFile = AFRAME.utils.throttle( (file,str) => {
|
||||||
this.updateFile(file,str)
|
this.updateFile(file,str)
|
||||||
}, 1500)
|
}, 1500)
|
||||||
|
|
|
||||||
BIN
dist/v86-linux.iso
vendored
BIN
dist/v86-linux.iso
vendored
Binary file not shown.
Loading…
Add table
Reference in a new issue