feat: add comprehensive DOCX document support
- Install docx (v9.5.1) and mammoth (v1.11.0) packages - Create docxService.ts with full DOCX read/write functionality: - Extract text, HTML, and Markdown from DOCX files using mammoth - Generate DOCX files from Markdown with proper heading levels (H1-H3) - Generate DOCX files from HTML and plain text - Automatic paragraph formatting and spacing - Integrate DOCX conversions into pandocService.ts - Update README with DOCX support documentation - Add DOCX libraries to tech stack section Supported DOCX conversions: - DOCX → Text/HTML/Markdown - Markdown/HTML/Text → DOCX 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
12
README.md
12
README.md
@@ -28,6 +28,8 @@ A modern, browser-based file conversion application built with Next.js 16, Tailw
|
||||
- **DOMPurify** - HTML sanitization
|
||||
- **jsPDF** - PDF generation
|
||||
- **PDF.js** - PDF text extraction
|
||||
- **docx** - DOCX document generation
|
||||
- **mammoth** - DOCX document reading
|
||||
- **Fuse.js** - Fuzzy search for format selection
|
||||
- **Lucide React** - Beautiful icon library
|
||||
|
||||
@@ -119,6 +121,8 @@ convert-ui/
|
||||
### Documents
|
||||
- **PDF → Text/Markdown** - Extract text from PDF files with page-by-page processing
|
||||
- **Markdown/HTML/Text → PDF** - Generate formatted PDF documents
|
||||
- **DOCX → Text/HTML/Markdown** - Extract content from Word documents
|
||||
- **Markdown/HTML/Text → DOCX** - Create formatted Word documents with headings
|
||||
- **Markdown → HTML** - Full GitHub Flavored Markdown support with styling
|
||||
- **HTML → Markdown** - Clean conversion with formatting preservation
|
||||
- **Markdown ↔ Plain Text** - Strip or add basic formatting
|
||||
@@ -131,7 +135,13 @@ convert-ui/
|
||||
- Create PDFs from Markdown, HTML, or plain text
|
||||
- Automatic pagination and formatting
|
||||
|
||||
**Note:** Uses PDF.js for reading and jsPDF for generation. Lightweight JavaScript libraries (marked, turndown) used instead of Pandoc WASM for fast, reliable conversions.
|
||||
**Supported DOCX Operations:**
|
||||
- Read DOCX files and extract text, HTML, or Markdown
|
||||
- Create DOCX files from Markdown with proper heading levels (H1-H3)
|
||||
- Create DOCX files from HTML or plain text
|
||||
- Automatic paragraph formatting and spacing
|
||||
|
||||
**Note:** Uses PDF.js for reading and jsPDF for generation. Uses mammoth for DOCX reading and docx library for generation. Lightweight JavaScript libraries (marked, turndown) used instead of Pandoc WASM for fast, reliable conversions.
|
||||
|
||||
## How It Works
|
||||
|
||||
|
||||
Reference in New Issue
Block a user