Skip to content

About

Cross-platform Electron markdown viewer with Mermaid diagrams, syntax highlighting, and dark mode

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

82 Commits

Folders and files

Repository files navigation

Markdown Viewer logo

Markdown Viewer

CI

A cross-platform Electron-based markdown viewer for macOS, Windows, and Linux.

Features

  • Clean, distraction-free markdown viewing
  • Edit documents next to a live preview and save with the Save button or Cmd/Ctrl+S (Cmd/Ctrl+E toggles edit mode, see docs/editing.md)
  • View the raw markdown source of a document in-app, toggled per tab (Cmd/Ctrl+Shift+S)
  • Copy the raw markdown source to the clipboard (Cmd/Ctrl+Shift+C)
  • Export the open document as PDF (Cmd/Ctrl+P, see docs/exporting.md)
  • In-document search (Cmd/Ctrl+F)
  • Mermaid diagram support (ERD, flowcharts, sequence diagrams, etc.)
  • Syntax highlighting for code blocks
  • GitHub Flavored Markdown support
  • File browser with folder navigation
  • Document outline navigation
  • Recent documents list
  • Live file watching (auto-reload on changes)
  • Dark/light mode toggle
  • Adjustable font size
  • A4/full-width view modes
  • File association with .md files
  • Cross-platform support (macOS, Windows, Linux)

Installation

Download the latest release from the Releases page.

From Source

  1. Clone this repository
  2. Install dependencies:
    npm install
  3. Run the app:
    npm start

Building

Build for all platforms:

npm run build

Build for specific platforms:

npm run build:mac    # macOS
npm run build:win    # Windows
npm run build:linux  # Linux

The Snap package is described by snap/snapcraft.yaml and built by the Snapcraft workflow on every release tag (and on pull requests that touch it); build it locally with snapcraft pack. It takes its version from package.json.

Install a macOS build into /Applications with make build install. The install step quits a running Markdown Viewer and removes the previously installed app before copying the new one, so the new build replaces the old one rather than being copied inside its bundle.

Usage

Opening Files

  • Click "Open File" button in the app
  • Drag and drop a .md file onto the app window
  • Double-click a .md file (after setting file associations)
  • Right-click a .md file and choose "Open with Markdown Viewer"

Keyboard Shortcuts

Shortcut Action
Cmd/Ctrl + F Search in document
Cmd/Ctrl + E Toggle edit mode
Cmd/Ctrl + P Export as PDF
Cmd/Ctrl + S Save the document (edit mode)
Cmd/Ctrl + Shift + S Toggle markdown source view
Cmd/Ctrl + Shift + C Copy markdown source
Cmd/Ctrl + O Open file
Cmd/Ctrl + Shift + O Open folder
Cmd/Ctrl + B Toggle sidebar
Cmd/Ctrl + R Reload current file
Enter Next search result
Shift + Enter Previous search result
Escape Close search

Mermaid Diagrams

Mermaid diagrams are rendered automatically. Use fenced code blocks with the mermaid language identifier:

```mermaid
erDiagram
    CUSTOMER ||--o{ ORDER : places
    ORDER ||--|{ LINE-ITEM : contains
```

Supported diagram types include flowcharts, sequence diagrams, ERD, class diagrams, state diagrams, and more.

Setting as Default Application

macOS

  1. Right-click any .md file
  2. Select "Get Info"
  3. Under "Open with:", select "Markdown Viewer"
  4. Click "Change All..." to set for all .md files

Windows

  1. Right-click any .md file
  2. Select "Open with" > "Choose another app"
  3. Select "Markdown Viewer"
  4. Check "Always use this app to open .md files"

Linux

  1. Right-click any .md file
  2. Select "Properties" or "Open With"
  3. Choose "Markdown Viewer" as the default application

Development

Running Tests

npm test              # Run tests without showing app windows
npm run test:headed   # Run tests with visible app windows

Linting

npm run lint          # Check for issues
npm run lint:fix      # Auto-fix issues

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

Please ensure tests pass and linting is clean before submitting.

Support

If you find this project useful, consider supporting its development:

Buy Me A Coffee

License

MIT

About

Cross-platform Electron markdown viewer with Mermaid diagrams, syntax highlighting, and dark mode

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages