class_docstr: Single line textbox widget.
class_docstr_tok: ["Single","line","textbox","widget","."]
docstr: (Un)Register a callback to handle text submission.
  
  Triggered when the user clicks enter.
  
  Parameters
  ----------
  callback: callable
      Will be called with exactly one argument: the Widget instance
  remove: bool (optional)
      Whether to unregister the callback
docstr_tok: ["(","Un",")","Register","a","callback","to","handle","text","submission",".","Triggered","when","the","user","clicks","enter",".","Parameters","--","--","--","--","--","callback",":","callable","Will","be","called","with","exactly","one","argument",":","the","Widget","instance","remove",":","bool","(","optional",")","Whether","to","unregister","the","callback"]
code: def on_submit(self, callback, remove=False):
      """(Un)Register a callback to handle text submission.
  
      Triggered when the user clicks enter.
  
      Parameters
      ----------
      callback: callable
          Will be called with exactly one argument: the Widget instance
      remove: bool (optional)
          Whether to unregister the callback
      """
      deprecation(
          "on_submit is deprecated. Instead, set the .continuous_update attribute to False and observe the value changing with: mywidget.observe(callback, 'value')."
      )
      self._submission_callbacks.register_callback(
          callback, remove=remove
      )
  
imports: from .widget_description import DescriptionStyle, DescriptionWidget
  from .valuewidget import ValueWidget
  from .widget import CallbackDispatcher, register, widget_serialization
  from .widget_core import CoreWidget
  from .trait_types import Color, InstanceDict, TypedTuple
  from .utils import deprecation
  from traitlets import Unicode, Bool, Int
label_desc: Use image node_id 3 for calling the Text obj's underlying member method code with example usage: obj.on_submit(callback, remove) without return types