md-ops
v1.0.0
Published
Convert Markdown <-> DOCX easily with full formatting support
Maintainers
Readme
md-ops
🔄 Convert Markdown ↔️ DOCX easily
A powerful Node.js library for converting between Markdown and DOCX formats with ease.
📦 Installation
npm install md-ops🚀 Quick Start
Convert Markdown to DOCX
import { mdToDocx } from "md-ops";
const markdown = `
# Hello World
This is **bold** and this is *italic*.
- Item 1
- Item 2
`;
await mdToDocx(markdown, "output.docx");Convert DOCX to Markdown
import { docxToMd } from "md-ops";
const markdown = await docxToMd("input.docx");
console.log(markdown);📖 API Reference
mdToDocx(markdown, outputPath?)
Converts Markdown text to a DOCX file.
Parameters:
markdown(string): The Markdown content to convertoutputPath(string, optional): Output file path (default: 'output.docx')
Returns: Promise<void>
Example:
await mdToDocx("# My Document", "my-file.docx");docxToMd(docxPath)
Converts a DOCX file to Markdown text.
Parameters:
docxPath(string): Path to the DOCX file
Returns: Promise<string> - The Markdown content
Example:
const markdown = await docxToMd("document.docx");✨ Supported Features
Markdown → DOCX
- ✅ Headings (H1-H6)
- ✅ Bold and Italic text
- ✅
Inline code - ✅ Code blocks
- ✅ Links
- ✅ Lists (ordered & unordered)
- ✅ Blockquotes
- ✅ Horizontal rules
DOCX → Markdown
- ✅ Headings
- ✅ Text formatting (bold, italic)
- ✅ Lists
- ✅ Links
- ✅ Tables (basic support)
📄 License
Proprietary © Consult Anubhav - All Rights Reserved
👨💻 Author
CA
Made with ❤️ for developers who need easy document conversion
