Files
textual/docs/widgets/markdown.md
2023-02-14 17:28:24 +00:00

41 lines
764 B
Markdown

# Markdown
A widget to display a Markdown document.
- [x] 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