mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 08:48:01 +00:00
Changing the keyboard shortcut for a text editor (#3058)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
98d71a25df
commit
43b772c186
@ -162,7 +162,7 @@
|
|||||||
const Handle = Extension.create({
|
const Handle = Extension.create({
|
||||||
addKeyboardShortcuts () {
|
addKeyboardShortcuts () {
|
||||||
return {
|
return {
|
||||||
'Shift-Enter': () => {
|
'Ctrl-Enter': () => {
|
||||||
const res = this.editor.commands.splitListItem('listItem')
|
const res = this.editor.commands.splitListItem('listItem')
|
||||||
if (!res) {
|
if (!res) {
|
||||||
this.editor.commands.first(({ commands }) => [
|
this.editor.commands.first(({ commands }) => [
|
||||||
@ -174,6 +174,10 @@
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
'Shift-Enter': () => {
|
||||||
|
this.editor.commands.setHardBreak()
|
||||||
|
return true
|
||||||
|
},
|
||||||
Enter: () => {
|
Enter: () => {
|
||||||
submit()
|
submit()
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user