generated from react18-tools/turborepo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
Mayank edited this page Jun 22, 2025
·
1 revision
import { Md } from "@m2d/react-markdown/client";
import { useRef } from "react";
import { toDocx } from "mdast2docx";
const astRef = useRef([]);
<Md astRef={astRef}>
{`# Hello\n\nThis is **Markdown**.`}
</Md>
<button onClick={() => {
const doc = toDocx(astRef.current[0].mdast);
// Save or export
}}>Export</button>Built with 💖 by Mayank Kumar Chaudhari · Sponsor · Courses