mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
support newline on shift+enter (#1324)
This commit is contained in:
parent
fdebb38bf6
commit
3fd6f3023f
1 changed files with 2 additions and 7 deletions
|
@ -108,18 +108,13 @@ export function textWysiwyg({
|
|||
if (event.key === KEYS.ESCAPE) {
|
||||
event.preventDefault();
|
||||
handleSubmit();
|
||||
}
|
||||
if (
|
||||
event.key === KEYS.ENTER &&
|
||||
(event.shiftKey || event[KEYS.CTRL_OR_CMD])
|
||||
) {
|
||||
} else if (event.key === KEYS.ENTER && event[KEYS.CTRL_OR_CMD]) {
|
||||
event.preventDefault();
|
||||
if (event.isComposing || event.keyCode === 229) {
|
||||
return;
|
||||
}
|
||||
handleSubmit();
|
||||
}
|
||||
if (event.key === KEYS.ENTER && !event.shiftKey) {
|
||||
} else if (event.key === KEYS.ENTER && !event.altKey) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue