Unanswered
I'm using the ReactMarkdown
library to convert Markdown to React in my application.
But tables don't seem to be working:
| Header1 | Header2 |
| ----------- | ----------- |
| Column1 | Column2 |
How do I support tables in my Markdown?
Use the remark-gfm NPM package. And use it as a plugin with ReactMarkdown
.
Import it:
import remarkGfm from "remark-gfm";
And then use it as a plugin with ReactMarkdown
:
<ReactMarkdown children={markdown} remarkPlugins={[remarkGfm]} />
You can read more in the ReactMarkdown
documentation: https://github.com/remarkjs/react-markdown#use.