An open API service indexing awesome lists of open source software.

https://github.com/nur-srijan/markdown-preview-export

Markdown previews with seamless PDF and HTML export
https://github.com/nur-srijan/markdown-preview-export

converter export export-pdf html markdown markdown-to-html markdown-to-pdf pdf pdf-generation visual-studio-code vscode-extension vscode-markdown

Last synced: 3 months ago
JSON representation

Markdown previews with seamless PDF and HTML export

Awesome Lists containing this project

README

          

# Markdown Rich Preview & Export πŸš€

[![VS Code Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/nur-srijan.markdown-rich-preview?style=plastic&label=Visual%20Studio%20Marketplace&color=green
)](https://marketplace.visualstudio.com/items?itemName=nur-srijan.markdown-rich-preview)
[![Rating](https://img.shields.io/visual-studio-marketplace/stars/nur-srijan.markdown-rich-preview?style=plastic&label=Rating)](https://marketplace.visualstudio.com/items?itemName=nur-srijan.markdown-rich-preview)
[![Open-VSX](https://img.shields.io/open-vsx/v/nur-srijan/markdown-rich-preview?style=plastic&label=Open%20VSX%20Registry)](https://open-vsx.org/extension/nur-srijan/markdown-rich-preview)
[![Open-VSX Rating](https://img.shields.io/open-vsx/stars/nur-srijan/markdown-rich-preview?style=plastic&label=Open%20VSX%20Rating)](https://open-vsx.org/extension/nur-srijan/markdown-rich-preview)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://marketplace.visualstudio.com/items/nur-srijan.markdown-rich-preview/license)

**πŸ’‘ Feature requests or issues?** β†’ Open an issue [here](https://github.com/nur-srijan/markdown-preview-export/issues/new/choose)

A powerful VS Code extension that brings GitHub-style Markdown previews and one-click PDF/HTML exports right into your editorβ€”no more Pandoc hacks or context-switching.

## ✨ Features

- **Rich Markdown Preview** - Instant, side-by-side preview with GitHub-like styling

![Enhanced Preview Demo](https://raw.githubusercontent.com/nur-srijan/markdown-preview-export/main/assets/EnhancedPreviewDemo.gif)

- **Export to PDF** - Create professional PDF documents with proper formatting

![Export to PDF Demo](https://raw.githubusercontent.com/nur-srijan/markdown-preview-export/main/assets/ExportToPdf.png)

- **Export to HTML** - Generate standalone HTML files with all styles included

![Export to HTML Demo](https://raw.githubusercontent.com/nur-srijan/markdown-preview-export/main/assets/ExportToHtml.png)

- **Real-time Updates** - See changes instantly as you type
- **Syntax Highlighting** - Beautiful code blocks with syntax highlighting
- **Math Support** - Support for KaTeX math rendering
- **Responsive Design** - Looks great on any device or screen size

## πŸš€ Quick Start

1. **Install** the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=nur-srijan.markdown-rich-preview)
2. **Open** any Markdown ([.md]()) file
3. **Right-click** in the editor and choose one of these options:
- "Markdown: Open Enhanced Preview" - For live preview
- "Markdown: Export to HTML" - To save as HTML
- "Markdown: Export to PDF" - To create a PDF document

## 🎯 Why Choose This Extension?

βœ… **All-in-One Solution** - Preview and export without leaving VS Code
βœ… **No Pandoc Hacks** - No need to switch to another tool or use Pandoc for export
βœ… **Beautiful Output** - Professional, clean formatting for all your documents
βœ… **Keyboard Shortcuts** - Quick access to all features
βœ… **Lightweight** - Fast performance with minimal resource usage
βœ… **Open Source** - Free to use and contribute to

## πŸ› οΈ For Developers

### Prerequisites
- Node.js
- VS Code
- npm

### Building from Source

```bash
# Clone the repository
git clone https://github.com/nur-srijan/markdown-preview-export.git
cd markdown-preview-export

# Install dependencies
npm install

# Package the extension (creates .vsix file)
npx vsce package

# Install the extension
code --install-extension markdown-rich-preview-*.vsix
```

### Testing
1. Press F5 to open a new VS Code window with the extension loaded
2. Open a Markdown file
3. Use the right-click context menu to test all features

## πŸ“ Contributing
We welcome contributions! Here's how you can help:

1. Fork the repository
2. Create a feature branch (git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'Add some amazing feature')
4. Push to the branch (git push origin feature/amazing-feature)
5. Open a Pull Request

## πŸ“„ License
This project is licensed under the MIT License - see the LICENSE file for details.

## πŸ™ Acknowledgments
- [Marked](https://github.com/markedjs/marked) - For Markdown parsing
- [Highlight.js](https://highlightjs.org/) - For syntax highlighting
- [Puppeteer](https://pptr.dev/) - For PDF generation

---

Made with ❀️ by Nur Srijan | [GitHub](https://github.com/nur-srijan) | [X]()