Skip to Content
组件RichText

RichText

RichText 直接渲染 HistoryBlock

RichText
RichText 终端效果图
RichText 的终端效果图

最小示例

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

什么时候用

  • 你已经有结构化的历史文本
  • 文本样式在渲染前已经确定
  • 你想让 live view 和 history view 共享同一种文本表示
Last updated on