mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
feat: add keyboard shortcut to save file in text (#9295)
Co-authored-by: Aviral Sharma <aviralsharma954@gmail.com>
This commit is contained in:
parent
6c3a434f2a
commit
ab89d4c16f
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue