A collection of remark plugins for markdown processing.
npm install remark-plugins
# or
yarn add remark-plugins
# or
bun install remark-plugins
# or
pnpm install remark-plugins
Note : These plugins requires
remark-directive
package to run so make sure to install that and call just before remark-plugins.import remarkDirective from 'remark-directive';
Transforms custom callout blocks in markdown into styled callouts.
import remarkCallout from 'remark-plugins/callout';
// or
import {remarkCallout} from 'remark-plugins';
<ReactMarkdown remarkPlugins={[remarkDirective,remarkCallout]} >
{markdown}
</ReactMarkdown>
::callout[warn]{title=Warning}
This is a custom note content.
:::
Transforms custom embed blocks in markdown into iframe embeds for YouTube, Vimeo, and other platforms.
import remarkEmbedfrom 'remark-plugins/embed';
// or
import {remarkEmbed} from 'remark-plugins';
<ReactMarkdown remarkPlugins={[ remarkDirective,remarkEmbed]} >
{markdown}
</ReactMarkdown>
::embed[youtube]{id=yaodD79Q4iE .some-class}
# or
::embed[iframe]{id=http://google.com .some-class}
Automatically generates slugified IDs for headings in markdown.
import slugifyHeading from 'remark-plugins/slugify-heading';
// or
import {slugifyHeading} from 'remark-plugins';
<ReactMarkdown remarkPlugins={[remarkDirective, slugifyHeading]} >
{markdown}
</ReactMarkdown>
# My Heading
This heading will have an ID of `my-heading`.