mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
renewal key binding
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user