mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 10:16:26 +00:00
add hotkey
This commit is contained in:
@@ -83,9 +83,14 @@ var SnippetForm = React.createClass({
|
||||
PlanetActions.updateSnippet(snippetId, snippet)
|
||||
}
|
||||
},
|
||||
handleKeyDown: function (e) {
|
||||
if (e.keyCode === 13 && e.metaKey) {
|
||||
this.submit()
|
||||
}
|
||||
},
|
||||
render: function () {
|
||||
return (
|
||||
<div className='SnippetForm'>
|
||||
<div onKeyDown={this.handleKeyDown} className='SnippetForm'>
|
||||
<div className='modal-body'>
|
||||
<div className='form-group'>
|
||||
<textarea ref='description' className='snippetDescription block-input' valueLink={this.linkState('snippet.description')} placeholder='Description'/>
|
||||
|
||||
Reference in New Issue
Block a user