English | δΈζ | π Website
A powerful VS Code extension for converting various document formats to Markdown and text formats with just one click.
- Word Documents (.docx, .doc) β Markdown
- Excel Spreadsheets (.xlsx, .xls, .csv) β Markdown Tables
- PDF Documents (.pdf) β Text Files
- β Context Menu Integration - Convert directly from file explorer
- β Command Palette Support - Access via Cmd+Shift+P
- β Batch Conversion - Select folders for bulk processing
- β Smart Text Processing - Automatically optimize conversion quality
- β Progress Indicators - Real-time conversion progress display
- β Error Handling - Comprehensive error messages and handling
- β Multi-language Support - Automatic language switching between English and Chinese
- Open VS Code Extensions Marketplace (
Ctrl+Shift+XorCmd+Shift+X) - Search for "Document Converter" or "hddevteam"
- Click Install
Visit the VS Code Marketplace and click Install.
# Clone the project
git clone https://github.com/hddevteam/vscode-md-converter.git
cd vscode-md-converter
# Install dependencies
npm install
# Compile extension
npm run compile
# Press F5 in VS Code for debugging- Context Menu: Right-click on document files in file explorer and select appropriate conversion option
- Command Palette:
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Windows/Linux) - Type conversion commands (e.g., "Convert Word to Markdown")
- Press
- Right-click on a folder containing documents
- Select "Batch Convert Documents"
- Follow prompts to select conversion types and options
Convert Word to Markdown- Convert Word documents to MarkdownConvert Excel to Markdown- Convert Excel files to Markdown tablesConvert PDF to Text- Convert PDF to text filesBatch Convert Documents- Batch convert documentsOpen Document Converter- Open converter interfaceTest PDF Conversion- Test PDF conversion functionality
- Preserve text formatting (bold, italic, etc.)
- Convert heading levels
- Handle lists and tables
- Support .docx and .doc formats
- Smart timeout handling (prevents .doc file freezing)
- Convert to Markdown table format
- Preserve cell data types
- Handle multiple worksheets
- Support .xlsx, .xls, .csv formats
- Automatic data formatting
- Advanced Text Processing Algorithms:
- Smart space correction
- Word boundary detection
- Punctuation formatting
- Hyphenated word reconstruction
- Text Quality Optimization:
- Remove extra whitespace
- Fix common spacing issues
- Protect URL and email formats
- Sentence structure optimization
- Output Enhancement:
- Add document metadata
- Organize content by paragraphs
- Markdown format output
The extension automatically switches interface language based on VS Code language settings:
- English (default) - For English environments
- Chinese - Automatically detects Chinese environments
Supported language features:
- Command titles and descriptions
- User interface text
- Error messages and prompts
- Configuration option descriptions
All converted files are saved in the same directory as the original files with appropriate formats:
- Word β
.mdfiles - Excel β
.mdfiles (with tables) - PDF β
.txtfiles
We're actively working on expanding format support and adding new capabilities:
- π PowerPoint Support: Convert .pptx presentations to Markdown with slide content and speaker notes
- π Table Extraction: Export tables from Word/PDF documents directly to CSV format
- πΌοΈ PDF to Images: Convert PDF pages to individual image files (PNG/JPG)
- π€ Enhanced Export: Export PowerPoint slides and PDF pages as high-quality images
- ποΈ Architecture Improvements: Better plugin system for future format extensions
View our complete roadmap | Track progress on GitHub
The extension supports the following configuration options (search for "Document Converter" in settings):
- Output directory settings
- Excel maximum rows limit
- Format preservation options
- Auto-open result files
- mammoth.js - Word document processing
- xlsx - Excel file processing
- pdf-parse - PDF text extraction
- VS Code API - Extension integration
src/
βββ converters/ # Core converters
β βββ wordToMarkdown.ts
β βββ excelToMarkdown.ts
β βββ pdfToText.ts
βββ commands/ # VS Code command handlers
βββ i18n/ # Internationalization support
β βββ index.ts # I18n manager
β βββ en.ts # English language pack
β βββ zh-cn.ts # Chinese language pack
βββ utils/ # Utility functions
βββ types/ # TypeScript type definitions
βββ extension.ts # Extension entry point
-
Conversion Failed
- Check if file is corrupted
- Ensure file is not open in other programs
- Check VS Code Developer Console for error messages
-
.doc File Conversion Freezing
- Extension has built-in timeout mechanism
- Recommend converting .doc files to .docx before processing
-
Poor PDF Text Quality
- Some PDFs may use image text, recommend using OCR tools
- Check if PDF is a scanned document
-
Interface Language Issues
- Extension automatically detects VS Code language settings
- Supports Chinese (zh-cn) and English environments
- Can change display language in VS Code settings
Press F5 in VS Code to run extension in debug mode and view detailed log information.
Welcome to submit Issues and Pull Requests to improve this extension!
See our Development Roadmap for planned features and upcoming improvements.
# Clone repository
git clone https://github.com/hddevteam/vscode-md-converter.git
cd vscode-md-converter
# Install dependencies
npm install
# Development mode compilation
npm run watch
# Run tests
npm test- Create new language file in
src/i18n/directory - Add language detection logic in
src/i18n/index.ts - Create corresponding
package.nls.{language}.jsonfile
MIT License - See LICENSE file for details
- β¨ Added directory structure preservation in batch conversion
- ποΈ Enhanced subfolder handling with original hierarchy
- π Improved conversion workflow with better progress reporting
- π Updated translations for subfolder structure features
- π§© Fixed additional context menu integration issues
- β¨ Added enhanced folder batch conversion
- π Added file count preview before batch conversion
- π Added conversion confirmation dialog
- β±οΈ Added total duration tracking for batch operations
- π§© Fixed folder context menu integration
- π Updated internationalization for new UI elements
- π¨ Updated extension branding to "OneClick Markdown Converter"
- π Enhanced GitHub Pages website with Chinese version
- π¨ Improved color scheme with modern purple-teal gradients
- π Updated internationalization support
- π§ Enhanced documentation and user guides
- π Published to VS Code Marketplace
- π Added comprehensive GitHub Pages website
- π¦ Professional packaging and distribution
- π¨ Created custom extension icon
- π Complete documentation and guides
- β¨ Initial release
- β Word to Markdown conversion
- β Excel to Markdown conversion
- β PDF to text conversion
- β Batch conversion functionality
- β VS Code integration
- β English and Chinese bilingual support
Enjoy the convenience of document conversion! π