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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user