TermUI.Widgets.MarkdownViewer (TermUI v1.0.0)
View SourceA scrollable markdown viewer component for TermUI.
Renders markdown content with syntax highlighting, scrolling support, and interactive code blocks that can be focused and copied.
Usage
MarkdownViewer.new(content: "# Hello\n\nThis is **bold** text.")Keyboard Navigation
↑/↓- Scroll up/down by linePage Up/Page Down- Scroll by pageHome/End- Jump to top/bottomTab- Cycle focus through code blocksEnter/c- Copy focused code block
Props
:content- Markdown content to display (default:""):width- Display width (default: 80):height- Display height (default: 24):on_copy- Callback called when code block is copied (optional)