Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Text

A text readout, optionally rendered as Markdown.

Import

from manywidgets import Text

Example

Read-only — drive it from another widget (see the linking guide). Echo a dropdown selection, rendered as Markdown:

from ipywidgets import jsdlink
from manywidgets import Dropdown, Text

pick = Dropdown(options=["**bold**", "_italic_", "`code`"], value="**bold**")
echo = Text(markdown=True)
jsdlink((pick, "value"), (echo, "value"))
display(pick, echo)

API

TraitTypeDefaultDescription
valueUnicode''
markdownBoolFalse
widget_idUnicode''Stable unique id used for cross-widget linking (auto-assigned).

With markdown=True, value is parsed to HTML and set as innerHTML — treat it as any notebook-authored content.