@bndynet/ichat-renderer-katex
v3.1.0
Published
KaTeX math rendering plugin for @bndynet/ichat: $inline$ and $$display$$ LaTeX math via markdown-it-katex.
Downloads
270
Readme
@bndynet/ichat-renderer-katex
KaTeX math rendering for iChat. Auto-registers markdown-it-katex on import so $...$ (inline) and $$...$$ (display) LaTeX math renders inside chat messages.
Install
npm install @bndynet/ichat-renderer-katexUsage
Import before any <i-chat> or <i-chat-messages> element connects to the DOM:
import '@bndynet/ichat-renderer-katex';That's it — no manual registerMarkdownPlugin call needed. Inline ($x^2$) and display ($$...$$) math now render automatically.
What's included
markdown-it-katexplugin registered on the shared markdown-it instance- Chat-friendly CSS — scrollable display math, no overflow breakage in chat bubbles
- KaTeX fonts via
@font-face(served from jsDelivr CDN)
Peer dependencies
| Package | Version |
|---|---|
| @bndynet/ichat-messages | ^2.1.1 |
| markdown-it | >=14 |
License
MIT
