Skip to content

Nir-Bhay/markups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

193 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

✨ Markups

A powerful, free online markdown editor with real-time preview

Deploy with Vercel MIT License Vite Monaco Editor

🌐 Live Demo β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature

Markups Screenshot


πŸš€ Features

✍️ Editor

  • 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

πŸ‘οΈ Preview

  • 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

πŸ“ Markdown Support

  • 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

πŸ“€ Export Options

  • πŸ“„ Markdown β€” Download as .md file
  • πŸ“‘ PDF β€” Export with preserved formatting
  • 🌐 HTML β€” Clean HTML with embedded styles
  • πŸ“‹ Copy β€” Quick copy to clipboard

πŸ› οΈ Advanced Features

  • πŸ“‘ 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

πŸ–₯️ Demo

Try it live at markdownlivepreview.com


πŸš€ Quick Start

Prerequisites

  • Node.js 18.0 or higher
  • npm 9.0 or higher

Installation

# 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 dev

Open http://localhost:5173 in your browser.


πŸ“¦ Build

# Create production build
npm run build

# Preview production build
npm run preview

The build output will be in the dist/ folder.


πŸš€ Deployment

Deploy to Vercel (Recommended)

Deploy with Vercel

Or manually:

  1. Push your code to GitHub
  2. Import your repository on Vercel
  3. Vercel auto-detects Vite and deploys

Build Settings:

Setting Value
Framework Vite
Build Command npm run build
Output Directory dist

Deploy to Netlify

# Install Netlify CLI
npm install -g netlify-cli

# Build and deploy
npm run build
netlify deploy --prod --dir=dist

Deploy to GitHub Pages

# Build the project
npm run build

# Deploy dist folder to gh-pages branch
npx gh-pages -d dist

⌨️ Keyboard Shortcuts

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

πŸ—οΈ Tech Stack

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

πŸ“ Project Structure

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

🀝 Contributing

Contributions are welcome! Please follow these steps:

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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


Made with ❀️ by Nir-Bhay

⭐ Star this repo if you find it useful!

About

A sleek, real-time Markdown editor with advanced preview, syntax highlighting, and extensible plugins.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors