A modern React application that converts Markdown text to DOCX documents with real-time preview. Built with Vite for fast development and optimized builds.
- ✨ Real-time Preview: See your Markdown rendered as HTML instantly
- 📄 DOCX Export: Convert Markdown to Microsoft Word documents
- 📋 Copy to Clipboard: Copy formatted HTML for pasting into Word or other applications
- 🎨 Clean Interface: Split-pane design with editor and preview
- 📱 Responsive Design: Works on desktop and mobile devices
- ⚡ Fast Performance: Built with Vite and React for optimal speed
- Headers (H1, H2, H3)
- Bold and italic text
Inline code- Tables
- Paragraphs
- Lists (coming soon)
- Links (coming soon)
- React 18 - Modern React with hooks
- Vite - Fast build tool and development server
- Showdown - Markdown to HTML converter
- docx - DOCX document generation
- file-saver - File download functionality
- Node.js (version 16 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/syawqy/markdown2docx.git
cd markdown2docx- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
npm run buildThe built files will be in the dist directory.
npm run preview- Write Markdown: Type or paste your Markdown content in the left panel
- Preview: See the formatted output in the right panel in real-time
- Export Options:
- Click "Download DOCX" to save as a Word document
- Click "Copy as HTML" to copy formatted content to clipboard
# My Document
This is a paragraph with **bold** and *italic* text.
## Table Example
| Column A | Column B |
|----------|----------|
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
### Code Example
Here's some `inline code` in a sentence.markdown2docx/
├── public/
│ └── vite.svg
├── src/
│ ├── App.jsx # Main application component
│ ├── App.css # Application styles
│ ├── main.jsx # React entry point
│ └── index.css # Global styles
├── package.json # Dependencies and scripts
├── vite.config.js # Vite configuration
└── README.md # This file
The project uses Vite with React plugin. Configuration can be found in vite.config.js.
Showdown converter is configured with:
- Tables support
- Simplified auto-linking
- Strikethrough text
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Complex table formatting may not transfer perfectly to DOCX
- Some advanced Markdown features are not yet supported
- Clipboard API requires HTTPS in production
- Support for more Markdown features (lists, links, images)
- Custom styling options for DOCX export
- Drag and drop file import
- Multiple export formats (PDF, HTML)
- Syntax highlighting for code blocks
- Document templates
This project is open source and available under the MIT License.