# Any Idea how to have on enter action on rich text input?

**URL:** <https://community.weweb.io/t/any-idea-how-to-have-on-enter-action-on-rich-text-input/19720>\
**Category:** Ask us anything\
**Created:** [August 20, 2025, 4:24am UTC](https://community.weweb.io/t/any-idea-how-to-have-on-enter-action-on-rich-text-input/19720 "2025-08-20T04:24:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Agustin\_Carozo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/agustin_carozo/32/13231_2.png) [@Agustin\_Carozo](https://community.weweb.io/u/Agustin_Carozo)\
**Post date:** [August 20, 2025, 3:18pm UTC](https://community.weweb.io/t/any-idea-how-to-have-on-enter-action-on-rich-text-input/19720/2 "2025-08-20T15:18:56Z")

</div>

Hi Yma 👋

Indeed the rich text doesn’t have a behavior where pressing enter could submit a form, unlike regular form inputs, as if you are using a rich text element one would expect users to be able to press enter to edit their text.

You could try to add some event listeners in your page or form to listen for keystrokes.  
In this post you can see some of these codes:

_(Be aware that this post is talking about **blocking** key strokes, but some of this thought process could help you find an answer.)_

> [@How to prevent form submission on enter key](https://community.weweb.io/t/how-to-prevent-form-submission-on-enter-key/15268/4):
>
> Solved the problem with this script: play_button JS The reason was that I put scripts inside page load workflows so they were initiated earlier than form was created. So I put the script inside “form” \>\> “on create” workflow.

---

_[View the full topic](https://community.weweb.io/t/any-idea-how-to-have-on-enter-action-on-rich-text-input/19720)._
