1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Add an event for deletion hotkey

This commit is contained in:
jacobherrington
2018-09-30 20:17:10 -05:00
parent 2ccd00a378
commit 4717e4fe3f
2 changed files with 8 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ class MarkdownNoteDetail extends React.Component {
const reversedType = this.state.editorType === 'SPLIT' ? 'EDITOR_PREVIEW' : 'SPLIT'
this.handleSwitchMode(reversedType)
})
ee.on('hotkey:deletenote', this.handleDeleteNote.bind(this))
ee.on('code:generate-toc', this.generateToc)
}
@@ -293,6 +294,10 @@ class MarkdownNoteDetail extends React.Component {
})
}
handleDeleteNote () {
this.handleTrashButtonClick()
}
renderEditor () {
const { config, ignorePreviewPointerEvents } = this.props
const { note } = this.state