react-markdown使用
2026/7/19 8:55:44 网站建设 项目流程

装包

yarn add react-markdown rehype-raw remark-gfm remark-math rehype-mathjax

import ReactMarkdown, { Components } from 'react-markdown' import rehypeRaw from 'rehype-raw' import remarkGfm from 'remark-gfm' import remarkMath from 'remark-math' import rehypeMathjax from 'rehype-mathjax' <ReactMarkdown rehypePlugins={[rehypeRaw, rehypeMathjax]} remarkPlugins={[remarkGfm, remarkMath]} > {item.content} </ReactMarkdown>

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询