I need to set up a certain workflow where the input text field needs to be more than one-liner, therefore a simple Text widget cannot be used. This is why the best fit is Textarea widget. However... this widget does not have an on_submit() method. Is there a way that I can add an on_submit() method to Textarea so it will work like a regular Text widget where I can submit entered text with an Enter key stroke. The preference is to keep to ipywidgets. Thanks!
import ipywidgets as widgets
text = widgets.Text()
display(text)
def handle_submit(sender):
print(text.value)
text.on_submit(handle_submit)
