1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

add hot key:Navigate up(Ctrl + P) for CodeEditor

This commit is contained in:
Rokt33r
2015-12-13 16:29:45 +09:00
parent 79e0e5668d
commit 3b9ad59849

View File

@@ -31,6 +31,14 @@ module.exports = React.createClass({
editor.setTheme('ace/theme/xcode')
editor.clearSelection()
editor.moveCursorTo(0, 0)
editor.commands.addCommand({
name: 'Emacs cursor up',
bindKey: {mac: 'Ctrl-P'},
exec: function (editor) {
editor.navigateUp(1)
},
readOnly: true
})
editor.setReadOnly(!!this.props.readOnly)