[BUG] Fix Ctrl+Enter on editor

- Add event listener for the `ce-quick-submit` event, which will be
triggered if `Ctrl+Enter` is pressed on a text area.
- Regression of 5cc0801de9
- Resolves #2762
This commit is contained in:
Gusted 2024-03-26 00:25:36 +01:00
parent 5194bd15ef
commit 9db76036bb
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -468,6 +468,9 @@ async function onEditContent(event) {
e.preventDefault(); e.preventDefault();
saveAndRefresh(dz); saveAndRefresh(dz);
}); });
$editContentZone.on('ce-quick-submit', () => {
$editContentZone.find('.save.button').trigger('click');
});
} else { } else {
comboMarkdownEditor = getComboMarkdownEditor($editContentZone.find('.combo-markdown-editor')); comboMarkdownEditor = getComboMarkdownEditor($editContentZone.find('.combo-markdown-editor'));
} }