mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Allow multiline text (#535)
* Allow multiline text * Figure out offset correctly * Run prettier
This commit is contained in:
parent
54f9c296b5
commit
d65e90209c
2 changed files with 9 additions and 7 deletions
|
@ -39,7 +39,7 @@ export function textWysiwyg({
|
|||
top: y + "px",
|
||||
left: x + "px",
|
||||
transform: "translate(-50%, -50%)",
|
||||
textAlign: "center",
|
||||
textAlign: "left",
|
||||
display: "inline-block",
|
||||
font: font,
|
||||
padding: "4px",
|
||||
|
@ -59,7 +59,7 @@ export function textWysiwyg({
|
|||
cleanup();
|
||||
return;
|
||||
}
|
||||
if (ev.key === KEYS.ENTER) {
|
||||
if (ev.key === KEYS.ENTER && !ev.shiftKey) {
|
||||
ev.preventDefault();
|
||||
if (ev.isComposing || ev.keyCode === 229) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue