Hello Retool Community,
I'm currently working on a Retool app and have encountered a challenge with the text area component. The Text Area component doesn't natively support a "Submit" event handler. My goal is to trigger a specific action (such as submitting data or executing a query) when a user presses the Enter key within the text area, while still allowing for multi-line input using Shift+Enter.
Has anyone successfully implemented a solution to detect the Enter key press within a Text Area component to trigger an action, while preserving Shift+Enter for new lines?
Use the text input or editable text components
Add a 'submit' event handler for the text input
Add a 'change' event handler for the editable text ones
@ferret141 - thatβs not quite what I need. Iβm looking for a text area with a submit option. The issue with a text input is that the text doesnβt wrap to the next line; it just stays on the same line.
Then the 'Editable Text Area' component should do what you need. It automatically expands to multiple lines.

1 Like
@Yashodhar_Meduri,
Sorry, but you are correct. If you hit "enter" in a text area, it creates a new line and there is no "submit" action for it. There are only "on change" "on focus" and "on blur" actions for text area components. If you want to "submit" data from a text area component, you will need to create a separate "submit" button and add an event handler to that.