Skip to content

[bug] Cannot insert line break in text element using Enter, Ctrl+Enter, or Command+Enter #2065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
spartan-uyen opened this issue Jun 5, 2025 · 0 comments · May be fixed by #2083
Open
Labels
bug Something isn't working

Comments

@spartan-uyen
Copy link

Summary:
Text elements do not accept line breaks. Pressing Enter (or modifiers like Ctrl/Command + Enter) has no effect, preventing multi-line input.

Steps to reproduce:

  1. Select a text element on the canvas.
  2. Begin editing the text.
  3. Press Enter, Ctrl+Enter, or Command+Enter to insert a new line.

Actual result:
No line break is added.
The text remains on a single line, regardless of key combination used.
https://github.com/user-attachments/assets/fe831b29-0a40-4dba-8d22-4416b0cb5303

Expected result:
A new line should be inserted at the cursor position, allowing for multi-line text input.

@spartan-uyen spartan-uyen added the bug Something isn't working label Jun 5, 2025
Rish-it added a commit to Rish-it/onlook that referenced this issue Jun 6, 2025
…g - Import splitBlock from prosemirror-commands for line break functionality - Modify Enter key handler to use conditional logic: Exit editor on empty paragraph or at end of single-line text, Create new paragraph/line break for normal text editing - Resolves issue where users couldn't insert line breaks in text elements - Fixes onlook-dev#2065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant