Files
textual/docs/widgets/markdown.md
Rodrigo Girão Serrão d787f61090 State version of widget addition in docs. (#2144)
* State version of widget addition in docs.

Related issues: #2133

* Fix ListX version info.

* Retroactively update changelog.
2023-03-27 22:32:18 +01:00

799 B

Markdown

!!! tip "Added in version 0.11.0"

A widget to display a Markdown document.

  • Focusable
  • Container

!!! tip

See [MarkdownViewer](./markdown_viewer.md) for a widget that adds additional features such as a Table of Contents.

Example

The following example displays Markdown from a string.

=== "Output"

```{.textual path="docs/examples/widgets/markdown.py"}
```

=== "markdown.py"

~~~python
--8<-- "docs/examples/widgets/markdown.py"
~~~

Messages

::: textual.widgets.Markdown.TableOfContentsUpdated

::: textual.widgets.Markdown.TableOfContentsSelected

::: textual.widgets.Markdown.LinkClicked

See Also

  • [Markdown][textual.widgets.Markdown] code reference
  • [MarkdownViewer][textual.widgets.MarkdownViewer] code reference