Skip to content

About

Markdown preview and reading mode for Notepad++, native on ARM64 and x64. Live preview, Mermaid diagrams, dark mode.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MarkdownReader banner: Markdown typed into Notepad++ on the left becomes a rendered page on the right

MarkdownReader for Notepad++

Your .md files deserve better than raw asterisks.
Live preview + full reading mode, native on ARM64 and x64.

Release Platforms Notepad++ License: GPL-3.0

Downloads CI Last commit Markdown Mermaid

Notepad++ in dark mode with sample.md in the editor and the MarkdownReader preview panel docked on the right showing a rendered table, highlighted code and Mermaid diagrams

Download for ARM64 (Windows on ARM, Snapdragon X, Surface) Download for x64 (Intel and AMD Windows PCs)

πŸ“¦ These are plugin zips, not installers. Here's the two-minute setup.

Notepad++ is the editor you already love. MarkdownReader is the part that finally makes README.md readable. One native DLL, zero .NET, zero background services. Open a Markdown file and it just... renders.

Note

v0.1.0 is an early preview. The core (panel, reading mode, scroll sync, diagrams, dark mode) is verified on Notepad++ 8.9.8.1 for ARM64 and x64. A few features are built but still waiting for hands-on testing; the feature list says exactly which.


What is MarkdownReader?

MarkdownReader is a native C++ plugin that turns Notepad++ into a proper Markdown reader. It renders your document with the same engine family as Microsoft Edge (WebView2), so tables, task lists, syntax-highlighted code and Mermaid diagrams look the way they do on GitHub, right next to the source or instead of it.

It was born on a Windows on ARM laptop, where the classic Markdown plugins simply refuse to load: they're x64-only .NET assemblies, and an ARM64 Notepad++ can't host them. So this one is native from day one, for ARM64 and x64.

πŸ“– Why another Markdown plugin?
  • ARM64. When this project started, the ARM64 Plugin Admin list had zero Markdown previewers.
  • Reading mode. Most previewers give you a side panel. Lots of us mostly read Markdown (runbooks, design docs, READMEs) and want the whole editor area rendered, one keystroke away.
  • Safety. Markdown previewers have shipped bugs where opening a crafted .md file could launch programs. This one was designed so the preview can show a document but never run anything (see Secure by design).
  • Modern rendering. GitHub-flavored Markdown, GitHub alerts, Mermaid 12, highlight.js, light and dark themes.

Feature showcase

Live preview panel

Open a .md file and a Markdown Preview panel docks itself next to the editor. Type, and it re-renders (debounced, so even multi-megabyte docs stay smooth). Pick Language β†’ Markdown on any file, even an unsaved one, and it lights up too.

Light theme: editor on the left, rendered preview panel on the right with headings, GitHub alerts and lists

Reading mode

Toggle Reading Mode and the editor area itself becomes the rendered document, at the exact spot you were reading. Toggle again, or double-click any paragraph, to jump back into the source at that line. Turn on Open Markdown in Reading Mode and .md files open as documents, not code.

Reading mode in the light theme: the editor area shows a rendered Mermaid sequence diagram and the Images and links section Reading mode in the dark theme: the editor area shows the rendered document with GitHub alerts, lists and task checkboxes

Scroll sync that actually syncs

Every rendered block knows which source lines it came from, so the editor and preview stay locked together, even inside long code fences and diagrams (a classic pain point). Scroll either side and the other follows.

Diagrams, code and GitHub-flavored everything

Tables, task lists, footnotes, front matter, [!NOTE] alerts, autolinks, raw HTML like <details> and <kbd>, syntax highlighting for 40+ languages, and Mermaid flowcharts, sequence diagrams, state charts and more. Mermaid's 5.5 MB engine loads only when a document actually has a diagram, and a broken diagram shows a friendly error instead of taking the page down.

Secure by design

A previewer should show your document. It should never run it.

  • Sanitized: rendered HTML goes through DOMPurify; scripts, event handlers and javascript: links never survive.
  • Locked down: a strict Content-Security-Policy, no navigation, no new windows, no downloads, no permission prompts.
  • Links go through a policy, not ShellExecute: http(s) and mailto open in your browser, local text and Markdown files open in Notepad++, and everything else is blocked (.exe, .cmd, shell:, file:, ...).
  • Images only: the plugin serves only image, audio and video files from your document's folder, and only regular files on disk.
  • Proven: a hostile test document (tests/manual/xss.md) and 100+ unit assertions guard all of the above.

Native on Windows on ARM

Built with MSVC for ARM64 and x64 (x86 builds too), statically linked: no VC++ redistributable, no WebView2Loader.dll, no .NET. Snapdragon X, Surface Pro, Windows Dev Kit: it runs at native speed.


Complete feature list

βœ… verified in Notepad++ 8.9.8.1 (ARM64 + x64) Β· πŸ§ͺ built, needs hands-on testing Β· πŸ—ΊοΈ planned

Preview & reading

Feature
βœ… Docked live preview, auto-opens for Markdown
βœ… Detects .md, .markdown, .mdown, ...
πŸ§ͺ Language β†’ Markdown renders any file
βœ… Re-renders while you type
βœ… Reading mode over the editor, per document
βœ… Editor β†’ preview scroll sync
πŸ§ͺ Preview β†’ editor scroll sync
πŸ§ͺ Double-click to jump to the source line
βœ… Panel restored when Notepad++ restarts

Rendering

Feature
βœ… GitHub-flavored Markdown + alerts + footnotes
βœ… Front matter (collapsed)
βœ… Syntax highlighting (40+ languages)
βœ… Mermaid diagrams, with friendly errors
βœ… Relative images from the document folder
πŸ§ͺ ../ images and UNC network shares
βœ… Light & dark, following Notepad++
πŸ§ͺ Your own custom.css

Getting things out

Feature
πŸ§ͺ Export to HTML (standalone, styles inlined)
πŸ§ͺ Export to PDF
πŸ§ͺ Print
πŸ§ͺ Copy rendered HTML (pastes into Outlook / Teams)

Living inside Notepad++

Feature
πŸ§ͺ Notepad++ shortcuts work while the preview has focus
πŸ§ͺ Links: browser / Notepad++ / blocked
βœ… Portable Notepad++ friendly
πŸ—ΊοΈ Native Markdown syntax highlighting (Language menu)

Installation

Important

MarkdownReader is a Notepad++ plugin, not an app. There's no setup program and nothing to double-click: you put a folder inside Notepad++'s plugins folder and Notepad++ loads it the next time it starts. It takes about two minutes, and every download includes these steps as INSTALL.txt.

Note

Accepted into Plugins Admin. MarkdownReader is now in Notepad++'s official plugin list (Plugin List v2.0). It arrives with the next Notepad++ update after 8.9.8.1, and then you can install it from Plugins β†’ Plugins Admin (search for MarkdownReader, tick it, click Install) with no manual steps. If your Notepad++ doesn't list it yet, use the steps below.

You'll need: Notepad++ 8.7.7 or newer and the Microsoft Edge WebView2 Runtime (already part of Windows 11; on Windows 10 it comes with Edge).

  1. Pick the right zip. In Notepad++, open ? β†’ About Notepad++ and look at the first line:

    It says Download
    (ARM 64-bit) MarkdownReader-arm64.zip
    (64-bit) MarkdownReader-x64.zip
  2. Close Notepad++.

  3. Unblock the zip. Right-click it β†’ Properties β†’ tick Unblock (if it's shown) β†’ OK. Windows can refuse to load DLLs that came from the internet; unblocking the zip before extracting avoids that.

  4. Create the plugin folder C:\Program Files\Notepad++\plugins\MarkdownReader\. Windows will ask for administrator permission; that's expected. Using a portable Notepad++? Create <your Notepad++ folder>\plugins\MarkdownReader\ instead.

  5. Copy everything from the zip into that folder, so that you end up with:

    plugins\
    └── MarkdownReader\
        β”œβ”€β”€ MarkdownReader.dll      ← must be directly in here
        β”œβ”€β”€ web\
        β”œβ”€β”€ INSTALL.txt
        β”œβ”€β”€ LICENSE
        └── THIRD_PARTY_NOTICES.txt
    

Warning

Windows' Extract All adds an extra folder level (MarkdownReader\MarkdownReader-arm64\MarkdownReader.dll), and Notepad++ won't find the plugin there. If that happens, move the files up one level.

  1. Start Notepad++ and open any .md file. πŸŽ‰ The Markdown Preview panel docks on the right, and everything else is under Plugins β†’ MarkdownReader.

Tip

On a first run Notepad++ docks new panels quite narrow. Drag the panel's edge to give it room; Notepad++ remembers.

Troubleshooting and uninstalling
What you see What to do
"Cannot load ARM64 plugin" or "Cannot load 64-bit plugin" You installed the zip for the other architecture; see step 1.
No MarkdownReader under the Plugins menu The DLL isn't directly inside plugins\MarkdownReader\ (step 5), or it's still blocked (step 3).
A message that the WebView2 Runtime is missing Install it from Microsoft, then restart Notepad++.

Uninstall: close Notepad++ and delete the plugins\MarkdownReader folder.


Using it

Everything lives under Plugins β†’ MarkdownReader. Bind any of these to keys in Settings β†’ Shortcut Mapper.

Command What it does
Toggle Preview Panel Show or hide the docked live preview
Toggle Reading Mode Render the current document over the editor (works on any document, if you insist)
Sync Scrolling Keep editor and preview scrolled together
Open Markdown in Reading Mode Markdown files open rendered instead of as source
Export to HTML... / PDF... / Print... Take the rendered document with you
Copy Rendered HTML Put rich HTML on the clipboard
Settings... Open the settings file in Notepad++ (saving it applies the changes)

Settings

MarkdownReader.ini lives in your plugin config folder (%APPDATA%\Notepad++\plugins\Config):

Key Default Meaning
extensions md markdown mdown mkd mkdn mdwn mdx Files treated as Markdown
autoOpenPanel 1 Open the panel when a Markdown file is activated
syncScroll 1 Scroll sync between editor and preview
readingModeByDefault 0 Open Markdown files in reading mode
theme auto auto follows Notepad++ dark mode, or light / dark
allowRemoteImages 1 Load https:// images (turn off to block tracking pixels)
mermaid 1 Render Mermaid diagrams
customCss (empty) Path to your own stylesheet (default ...\Config\MarkdownReader\custom.css)
devTools 0 F12 developer tools in the preview, for troubleshooting

How it works

flowchart LR
  subgraph NPP["Notepad++ (ARM64 or x64)"]
    E["Editor (Scintilla)"] -- "text changed (debounced)" --> P["MarkdownReader.dll (C++20)"]
  end
  P -- "PostWebMessageAsJson" --> W["WebView2 page: markdown-it, DOMPurify, highlight.js, Mermaid"]
  W -- "scroll, link click, double-click" --> P
  P -- "link policy" --> L["Browser / Notepad++ / blocked"]
Loading

Yes, that diagram is Mermaid. MarkdownReader renders it too.

The architecture in a few sentences

The DLL listens to Notepad++ and Scintilla notifications, reads the document (converting legacy code pages to UTF-8), and posts it as JSON to a bundled page running in WebView2. The page renders with markdown-it, tags every block with its source lines for scroll sync, sanitizes with DOMPurify and patches the DOM with morphdom, so updates don't flicker or lose your place. The page is served from a private virtual host; the document's own images come from a second, read-only origin mapped to its folder. One WebView2 environment is shared by the panel and the reading views, with its profile in %LOCALAPPDATA% (or next to a portable Notepad++).


Building from source

Prerequisites and commands
  • Visual Studio 2022 (or Build Tools) with Desktop development with C++, the ARM64 and x64/x86 MSVC tools, and the Windows 11 SDK
  • Node.js 22+
git clone https://github.com/rsalinger/NotepadPlusPlus-Markdown.git
cd NotepadPlusPlus-Markdown

# Sandbox: portable Notepad++ copies in .npp-dev\ (your installed Notepad++ is never touched)
scripts\setup-dev.ps1

# Build the plugin + preview page, deploy into the sandbox, and launch it
scripts\deploy-dev.ps1 -Launch -File tests\manual\sample.md

# Release zips (MarkdownReader-arm64.zip, MarkdownReader-x64.zip) in build\dist
scripts\package.ps1

Tests: cd web; npm test (renderer, sanitizer XSS corpus, scroll-sync math) and build\Debug\ARM64\NativeTests.exe (URL mapping, link policy, messages, clipboard). GitHub Actions runs both on every push and pull request.

Preview page without Notepad++: cd web; npm run build:dev; node dev/serve.mjs, then open http://localhost:5178/?file=sample.md. A devHost object in the console plays the plugin's part.

Path What lives there
src/ The plugin: Notepad++ integration, WebView2 hosting, panel, reading overlay
src/core/ Pure, unit-tested logic: URL ↔ file mapping, link policy, messages
src/npp/ Vendored Notepad++ plugin headers (GPL-3.0-or-later)
web/ The preview page: rendering, sanitizing, scroll sync, export
tests/ Native unit tests and manual test documents
scripts/ Sandbox setup, deploy, install, packaging

Roadmap

  • v0.1: live preview, reading mode, scroll sync, Mermaid, dark mode, native ARM64 + x64
  • Plugins Admin listing: accepted in Plugin List v2.0, available with the next Notepad++ release
  • CI on GitHub Actions: ARM64, x64 and x86 builds plus the web and native tests (thanks to chcg)
  • Hands-on verification of export, print, links and shortcuts β†’ v0.2
  • Toolbar buttons, a settings dialog and an x86 release
  • Native Markdown syntax highlighting with its own Language menu entry
  • Ideas welcome: open an issue!

Contributing

Bug reports, ideas and pull requests are all welcome. If you're on Windows on ARM, you're especially wanted: tell us what works on your machine. For security problems, please don't open a public issue: report them privately through the repository's Security β†’ Report a vulnerability page.

License

GPL-3.0-or-later, like Notepad++ itself. Release zips include THIRD_PARTY_NOTICES.txt with the licenses of everything bundled.

Acknowledgements

Standing on the shoulders of Notepad++ by Don Ho, Microsoft WebView2, markdown-it, DOMPurify, Mermaid, highlight.js, morphdom, github-markdown-css and nlohmann/json. The logo uses the public-domain Markdown mark.



Made for people who read more Markdown than they write.

About

Markdown preview and reading mode for Notepad++, native on ARM64 and x64. Live preview, Mermaid diagrams, dark mode.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages