Warning

This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: html.widgets.widget_string

String class.

Represents a unicode string using a widget.

4 Classes

class IPython.html.widgets.widget_string.HTML(value=None, **kwargs)

Bases: IPython.html.widgets.widget_string._String

Renders the string value as HTML.

class IPython.html.widgets.widget_string.Latex(value=None, **kwargs)

Bases: IPython.html.widgets.widget_string._String

Renders math inside the string value as Latex (requires $ $ or $$ $$ and similar latex tags).

class IPython.html.widgets.widget_string.Textarea(value=None, **kwargs)

Bases: IPython.html.widgets.widget_string._String

Multiline text area widget.

class IPython.html.widgets.widget_string.Text(*args, **kwargs)

Bases: IPython.html.widgets.widget_string._String

Single line textbox widget.

__init__(*args, **kwargs)
on_submit(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