Changing the keyboard shortcut for a text editor (#3058)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2023-04-25 11:36:39 +03:00 committed by GitHub
parent 98d71a25df
commit 43b772c186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,7 @@
const Handle = Extension.create({
addKeyboardShortcuts () {
return {
'Shift-Enter': () => {
'Ctrl-Enter': () => {
const res = this.editor.commands.splitListItem('listItem')
if (!res) {
this.editor.commands.first(({ commands }) => [
@ -174,6 +174,10 @@
}
return true
},
'Shift-Enter': () => {
this.editor.commands.setHardBreak()
return true
},
Enter: () => {
submit()
return true