Implementation:Ucbepic Docetl MarkdownCell
| Knowledge Sources | |
|---|---|
| Domains | Frontend, React_UI |
| Last Updated | 2026-02-08 00:00 GMT |
Overview
Concrete tool for the memoized markdown rendering cell component used in data tables and cell displays.
Description
The MarkdownCell component renders markdown content using ReactMarkdown with custom component overrides for headings (h1-h4), lists (ordered and unordered), code blocks (with language detection), blockquotes, and inline code. It also includes a VegaVisualizer sub-component that renders Vega and Vega-Lite chart specifications embedded in code blocks. The component is wrapped in React.memo for performance optimization in table rendering contexts.
Usage
Used by SearchableCell and ResizableDataTable to render markdown-formatted cell content in the output data tables.
Code Reference
Source Location
- Repository: Ucbepic_Docetl
- File: website/src/components/MarkdownCell.tsx
- Lines: 1-190
Signature
interface MarkdownCellProps {
content: string;
}
export const MarkdownCell = React.memo(({ content }: MarkdownCellProps) => { ... })
interface VegaVisualizerProps {
spec: string;
mode: Mode; // "vega" | "vega-lite"
}
Import
import { MarkdownCell } from "@/components/MarkdownCell";
I/O Contract
Inputs (Props)
| Name | Type | Required | Description |
|---|---|---|---|
| content | string | Yes | Markdown text to render |
Outputs
| Name | Type | Description |
|---|---|---|
| rendered | JSX.Element | Styled markdown content with optional Vega charts |
Usage Examples
<MarkdownCell content="## Summary\n\nThis is a **bold** analysis of the data." />