Skip to Content
WidgetsRichText

RichText

RichText renders a HistoryBlock directly.

RichText
RichText terminal preview
Terminal preview of RichText

Smallest example

let block = history_block_from_text("line 1\nline 2", 40); let content = RichText::new(block).build();

Use RichText when

  • you already have structured history lines
  • text style is already computed before rendering
  • you want the same representation for live view and history view

Key builder methods

  • RichText::new(block)
  • .layout(...)
Last updated on