ElixirOpentui.Widgets.Markdown (ElixirOpentui v0.2.0)

Copy Markdown View Source

Markdown rendering widget via EarmarkParser.

Parses markdown content and produces a structured element tree with styled blocks for headings, paragraphs, code blocks, lists, etc.

Props

  • :content — markdown string
  • :id — element id
  • :scroll_offset — vertical scroll position (default: 0)
  • :visible_lines — number of visible lines (default: nil, show all)
  • :code_filetype — default filetype for fenced code blocks (optional)

Summary

Functions

Parse markdown content into a list of block structures.

Functions

parse_markdown(content)

@spec parse_markdown(String.t() | nil) :: [map()]

Parse markdown content into a list of block structures.

Each block has a :type and type-specific fields.