Skip to content

Commit

Permalink
fix: tab key in code block
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Trovic <luka@nextcloud.com>
  • Loading branch information
luka-nextcloud authored and juliushaertl committed Aug 1, 2023
1 parent 6511589 commit f1ed024
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Editor.vue
Expand Up @@ -721,6 +721,13 @@ export default {
return
}
if (event.key === 'Tab' && !event.shiftKey && !event.ctrlKey && !event.metaKey && this.$editor.isActive('codeBlock')) {
this.$editor.commands.insertContent('\t')
this.$editor.commands.focus()
event.preventDefault()
return
}
if ((event.ctrlKey || event.metaKey) && event.key === 's') {
this.$syncService.save()
event.preventDefault()
Expand Down

0 comments on commit f1ed024

Please sign in to comment.