fix issues shift enter

This commit is contained in:
Phillip 2023-01-12 21:31:41 -05:00
parent ddb91d2266
commit a3b326243b
2 changed files with 7 additions and 2 deletions

View File

@ -1267,6 +1267,7 @@ class ChatPage extends LitElement {
onUpdate: ()=> { onUpdate: ()=> {
this.shadowRoot.getElementById('_chatEditorDOM').getMessageSize(this.editor.getJSON()) this.shadowRoot.getElementById('_chatEditorDOM').getMessageSize(this.editor.getJSON())
}, },
element: elementChatId, element: elementChatId,
extensions: [ extensions: [
StarterKit, StarterKit,
@ -1283,7 +1284,12 @@ class ChatPage extends LitElement {
chatTextEditor.sendMessageFunc({ chatTextEditor.sendMessageFunc({
}) })
return true return true
} },
"Shift-Enter": () =>
this.editor.commands.first(() => [
this.editor.commands.newlineInCode()
]),
} }
}}) }})
] ]

View File

@ -296,7 +296,6 @@ class ChatTextEditor extends LitElement {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
word-break: break-all; word-break: break-all;
display: flex;
} }
.ProseMirror mark { .ProseMirror mark {