We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import { serialize } from 'next-mdx-remote/serialize'; import rehypeSanitize, { defaultSchema } from 'rehype-sanitize'; const schema = { ...defaultSchema, tagNames: [ ...defaultSchema.tagNames!, 'Callout', ], attributes: { ...defaultSchema.attributes, Callout: ['*'], }, }; const source = "<Callout emoji='💡'>Testing</Callout>" const mdxSource = await serialize(source, { mdxOptions: { remarkPlugins: [remarkGfm], rehypePlugins: [ [ rehypeSanitize, { schema: schema, }, ], ], format: 'mdx', }, }); console.log(mdxSource) // empty don't have Callout component
Is there is a way to render that component while using rehype-sanitize
the version I use is
"rehype-sanitize": "^6.0.0", "next-mdx-remote": "^5.0.0",
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there is a way to render that component while using rehype-sanitize
the version I use is
The text was updated successfully, but these errors were encountered: