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

added shortcut for toggle mode

This commit is contained in:
Nguyễn Việt Hưng
2018-05-18 10:52:42 +07:00
parent c9cb31bd02
commit fb24efd3de
2 changed files with 11 additions and 0 deletions

View File

@@ -55,6 +55,10 @@ class MarkdownNoteDetail extends React.Component {
componentDidMount () {
ee.on('topbar:togglelockbutton', this.toggleLockButton)
ee.on('topbar:togglemodebutton', () => {
const reversedType = this.state.editorType === 'SPLIT' ? 'EDITOR_PREVIEW' : 'SPLIT'
this.handleSwitchMode(reversedType)
})
}
componentWillReceiveProps (nextProps) {