mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
41 lines
764 B
Markdown
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
|