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

renewal key binding

This commit is contained in:
Rokt33r
2015-12-29 02:18:37 +09:00
parent b820bdec09
commit 0187217c86
17 changed files with 388 additions and 48 deletions

View File

@@ -2,7 +2,9 @@ import React from 'react'
import ReactDOM from 'react-dom'
import modes from '../lib/modes'
import _ from 'lodash'
var ace = window.ace
const remote = require('electron').remote
const ace = window.ace
module.exports = React.createClass({
propTypes: {
@@ -40,6 +42,15 @@ module.exports = React.createClass({
},
readOnly: true
})
editor.commands.addCommand({
name: 'Focus title',
bindKey: {win: 'Esc', mac: 'Esc'},
exec: function (editor, e) {
console.log(e)
remote.getCurrentWebContents().send('detail-edit')
},
readOnly: true
})
editor.setReadOnly(!!this.props.readOnly)