
A modern, feature-rich markdown editor and previewer built with Go and modern web technologies.
Features • Quick Start • Shortcuts • Guide • Architecture
Markdown-Preview is a lightweight yet powerful markdown editor that combines real-time preview with modern features. Built with performance and usability in mind, it offers a seamless writing experience for developers, technical writers, and markdown enthusiasts.
Category | Features | Description |
---|---|---|
Editor | - Real-time preview - Split view with resizable panes - Syntax highlighting - Auto-save functionality |
Advanced editor with instant preview and modern IDE features |
Appearance | - Dark/Light mode - Clean, modern UI - Mobile responsive design |
Polished interface that adapts to any device or preference |
Functionality | - Offline support - Image upload & drag-n-drop - Keyboard shortcuts |
Works without internet and supports rich media content |
Documentation | - Comprehensive Markdown Guide: - Interactive examples (click-to-copy) - Live Markdown-to-HTML demo - Common patterns/templates - Guide search functionality - Shortcut cheat sheet - Fullscreen mode - Contextual tooltips and hints |
Built-in learning resources and contextual help, significantly enhanced. |
Metric | Value | Description |
---|---|---|
Initial Load | ~2MB | Optimized bundle size |
Preview Latency | ~50ms | Real-time markdown rendering |
Memory Usage | <100MB | Efficient resource utilization |
Browser Support | Modern Browsers | Chrome 80+, Firefox 75+, Safari 13+ |
require (
github.com/gomarkdown/markdown v0.0.0-latest
github.com/gorilla/mux v1.8.0
github.com/tdewolff/minify/v2 v2.12.0
)
go version >= 1.16
git clone https://github.com/TMHSDigital/Markdown-Preview.git && cd Markdown-Preview && go run main.go
- Clone the repository:
git clone https://github.com/TMHSDigital/Markdown-Preview.git
cd Markdown-Preview
- Install dependencies:
go mod download
- Run the application:
go run main.go
- Open your browser:
http://localhost:8080
Category | Shortcut | Action | Context |
---|---|---|---|
File Operations | Ctrl+S |
Save | Editor |
Text Formatting | Ctrl+B Ctrl+I Ctrl+K Ctrl+ `` |
Bold Italic Link Code |
Editor |
List Operations | Ctrl+Shift+L Ctrl+Shift+O Ctrl+Shift+T |
Unordered List Ordered List Task List |
Editor |
Block Elements | Ctrl+Shift+C Ctrl+Shift+H |
Blockquote Horizontal Rule |
Editor |
UI Controls | Ctrl+P Ctrl+F Alt+Z Ctrl+? |
Toggle Preview Open Search Toggle Word Wrap Toggle Guide |
Global |
For a complete list of keyboard shortcuts, see the Shortcuts section in the built-in guide.
Markdown-Preview includes a comprehensive interactive guide that helps users learn and master Markdown syntax:
- Interactive Examples: Click any code example to copy it to your clipboard.
- Live Demo: Test Markdown syntax and see the HTML output in real-time.
- Template Library: Ready-to-use templates for READMEs, blog posts, and meeting notes.
- Search Functionality: Quickly find specific Markdown syntax elements.
- Keyboard Shortcuts: Complete list of keyboard shortcuts for efficient editing.
- Fullscreen Mode: Distraction-free learning experience.
Access the guide by clicking the ? button in the toolbar.
Markdown-Preview/
├── main.go # Application entry point and server setup
├── static/ # Static assets and client-side resources
│ ├── styles.css # CSS styling and theme definitions
│ ├── guide.html # Interactive markdown guide with documentation
│ └── images/ # Static images and icons
├── templates/ # Go HTML templates
│ └── index.html # Main application template
├── internal/ # Internal packages
│ ├── markdown/ # Markdown processing
│ └── server/ # HTTP server logic
└── uploads/ # User uploaded content (gitignored)
Feature | Implementation |
---|---|
Input Sanitization | HTML sanitization and markdown safe rendering |
Upload Security | File type validation and size limits |
XSS Protection | Content Security Policy (CSP) headers |
CSRF Protection | Token-based request validation |
This project is licensed under the MIT License - see the LICENSE file for details.
Category | Technology | Usage |
---|---|---|
Backend | Go 1.16+ | Server runtime |
Frontend | Vanilla JS | Client-side logic |
Markdown | gomarkdown | Markdown processing |
Syntax Highlighting | Prism.js | Code block highlighting |
UI Components | Material Icons | Interface icons |
Templates | Go html/template | HTML rendering |
Powered by Go. Built by TMHSDigital.