@seij/common-ui-markdown
v0.1.2
Published
Markdown rendering component for Seij UIs, with support for syntax highlighting and math.
Readme
common-ui-markdown
Markdown rendering component for Seij UIs, with support for syntax highlighting and math.
Usage
import { Markdown } from "@seij/common-ui-markdown";
import "@seij/common-ui-markdown/styles";
export function HelpPanel() {
return <Markdown>{`# Title\n\nSome **markdown** here.`}</Markdown>;
}What it provides
MarkdownReact component built onreact-markdown.- GitHub-flavored markdown and math support via
remark-gfmandremark-math. - Syntax highlighting and KaTeX rendering via
rehype-highlightandrehype-katex. - Safe HTML handling with
rehype-sanitize(custom schema for code, links, and images). - Optional style imports for highlight.js and KaTeX via
styles.ts.
Supported markdown features
- Headings, emphasis, lists, blockquotes, and tables (GFM).
- Inline code and fenced code blocks with language highlighting.
- Task lists and strikethrough (GFM).
- Links (opened in a new tab) and images (lazy-loaded).
- Inline and block math (KaTeX).
