mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +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.setTheme('ace/theme/xcode')
|
||||||
editor.clearSelection()
|
editor.clearSelection()
|
||||||
editor.moveCursorTo(0, 0)
|
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)
|
editor.setReadOnly(!!this.props.readOnly)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user