A powerful, free online markdown editor with real-time preview
- Monaco Editor β VS Code's powerful editor with IntelliSense
- Syntax Highlighting β Full markdown syntax support
- Multiple Themes β VS Light/Dark, Dracula, GitHub, Solarized
- Customizable β Font size, font family, line numbers, word wrap
- Live Preview β Real-time rendering as you type
- Split View β Side-by-side editor and preview with resizable divider
- Scroll Sync β Synchronized scrolling between editor and preview
- Dark/Light Mode β Automatic theme switching
- GitHub Flavored Markdown β Tables, task lists, strikethrough
-
KaTeX Math β LaTeX math equations (
$inline$ and$$block$$ ) - Mermaid Diagrams β Flowcharts, sequence diagrams, Gantt charts
- Syntax Highlighting β Code blocks with Prism.js
- Footnotes β Reference-style footnotes
- Alerts β GitHub-style alert blocks
- π Markdown β Download as .md file
- π PDF β Export with preserved formatting
- π HTML β Clean HTML with embedded styles
- π Copy β Quick copy to clipboard
- π Multi-Tab Support β Work on multiple documents
- π Templates β Pre-built document templates
- β¨οΈ Snippets β Quick text insertions
- π― Focus Mode β Distraction-free writing
- β¨οΈ Typewriter Mode β Keep cursor centered
- π Statistics β Word/character/reading time
- π― Writing Goals β Set and track word count goals
- π Table of Contents β Auto-generated navigation
- π Linting β Markdown best practices checking
- πΎ Auto-Save β Never lose your work
- π± PWA Support β Install as desktop/mobile app
Try it live at markdownlivepreview.com
- Node.js 18.0 or higher
- npm 9.0 or higher
# Clone the repository
git clone https://github.com/Nir-Bhay/markdown-live-preview.git
# Navigate to directory
cd markdown-live-preview
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 in your browser.
# Create production build
npm run build
# Preview production build
npm run previewThe build output will be in the dist/ folder.
Or manually:
- Push your code to GitHub
- Import your repository on Vercel
- Vercel auto-detects Vite and deploys
Build Settings:
| Setting | Value |
|---|---|
| Framework | Vite |
| Build Command | npm run build |
| Output Directory | dist |
# Install Netlify CLI
npm install -g netlify-cli
# Build and deploy
npm run build
netlify deploy --prod --dir=dist# Build the project
npm run build
# Deploy dist folder to gh-pages branch
npx gh-pages -d dist| Action | Windows/Linux | macOS |
|---|---|---|
| Save as Markdown | Ctrl + S |
β + S |
| Export to PDF | Ctrl + P |
β + P |
| Import File | Ctrl + O |
β + O |
| Toggle Dark Mode | Ctrl + D |
β + D |
| Bold | Ctrl + B |
β + B |
| Italic | Ctrl + I |
β + I |
| Insert Link | Ctrl + K |
β + K |
| Heading 1 | Ctrl + 1 |
β + 1 |
| Heading 2 | Ctrl + 2 |
β + 2 |
| Heading 3 | Ctrl + 3 |
β + 3 |
| Toggle Focus Mode | Ctrl + Shift + F |
β + β§ + F |
| Open Export Modal | Ctrl + Shift + E |
β + β§ + E |
| Fullscreen | F11 |
F11 |
| Show Help | Ctrl + H |
β + H |
| Technology | Purpose |
|---|---|
| Vite | Build tool & dev server |
| Monaco Editor | Code editor |
| Marked | Markdown parser |
| Mermaid | Diagrams |
| KaTeX | Math equations |
| Prism.js | Syntax highlighting |
| DOMPurify | XSS sanitization |
| html2pdf.js | PDF export |
markdown-live-preview/
βββ index.html # Main HTML entry
βββ package.json # Dependencies
βββ vite.config.js # Vite configuration
βββ vercel.json # Vercel deployment config
βββ public/
β βββ css/ # Stylesheets
β β βββ premium-ui.css # Main UI styles
β β βββ style.css # Base styles
β βββ image/ # Static images
β βββ manifest.json # PWA manifest
β βββ sw.js # Service worker
βββ src/
βββ main.js # Application entry
βββ config/ # Configuration
βββ core/ # Core services
β βββ editor/ # Monaco editor
β βββ markdown/ # Markdown parser
β βββ storage/ # LocalStorage
βββ features/ # Feature modules
β βββ tabs/ # Multi-tab support
β βββ toc/ # Table of contents
β βββ goals/ # Writing goals
β βββ ...
βββ services/ # Services
β βββ export/ # Export (PDF, HTML, MD)
β βββ shortcuts/ # Keyboard shortcuts
βββ ui/ # UI components
β βββ toast/ # Notifications
β βββ modal/ # Modal dialogs
β βββ theme/ # Theme management
βββ utils/ # Utilities
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Monaco Editor by Microsoft
- Marked for markdown parsing
- Mermaid for diagram support
- KaTeX for math rendering
Made with β€οΈ by Nir-Bhay
β Star this repo if you find it useful!