feat: add keyboard shortcut to save file in text (#9295)

Co-authored-by: Aviral Sharma <aviralsharma954@gmail.com>
This commit is contained in:
KODIFY 2025-03-26 02:48:55 +05:30 committed by GitHub
parent 6c3a434f2a
commit ab89d4c16f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,8 @@ import {
isTestEnv,
} from "../utils";
import { actionSaveToActiveFile } from "../actions";
import {
originalContainerCache,
updateOriginalContainerCache,
@ -392,6 +394,10 @@ export const textWysiwyg = ({
event.preventDefault();
submittedViaKeyboard = true;
handleSubmit();
} else if (actionSaveToActiveFile.keyTest(event)) {
event.preventDefault();
handleSubmit();
app.actionManager.executeAction(actionSaveToActiveFile);
} else if (event.key === KEYS.ENTER && event[KEYS.CTRL_OR_CMD]) {
event.preventDefault();
if (event.isComposing || event.keyCode === 229) {