Skip to content

Commit f1ed024

Browse files
luka-nextcloudjuliusknorr
authored andcommitted
fix: tab key in code block
Signed-off-by: Luka Trovic <luka@nextcloud.com>
1 parent 6511589 commit f1ed024

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/Editor.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,13 @@ export default {
721721
return
722722
}
723723
724+
if (event.key === 'Tab' && !event.shiftKey && !event.ctrlKey && !event.metaKey && this.$editor.isActive('codeBlock')) {
725+
this.$editor.commands.insertContent('\t')
726+
this.$editor.commands.focus()
727+
event.preventDefault()
728+
return
729+
}
730+
724731
if ((event.ctrlKey || event.metaKey) && event.key === 's') {
725732
this.$syncService.save()
726733
event.preventDefault()

0 commit comments

Comments
 (0)