How to use Markdown in Notepad++

240,748

Solution 1

MarkdownViewer++ is a Notepad++ plugin that lets you type a file using Markdown and see the preview in real time, in a preview panel.

To clarify: unlike Markdown Syntax Highlighting for Notepad++, which was recommended by Oliver Salzburg here, it doesn't support inline rendering. The text file is treated as a normal one, and the plugin shows it rendered in another pane.

Syntax highlighting is provided by Notepad++.

A picture will make it clearer:

(Click here to see it at full size)

Among its features:

  • It supports CommonMark
  • You can export the result to HTML or to PDF
  • The preview panel can be moved around, resized at will, and docked

How to install it

To install it, use Notepad++'s plugin manager: open Notepad++ and go to PluginsPlugins Admin..., then search for MarkdownViewer++, select it, and click on Install. It will automatically download the plugin and install it. At this point the editor must be restarted, and it will ask you whether you want to do it immediately (so there's no risk of losing your work).

Solution 2

There's a project called Markdown Syntax Highlighting for Notepad++ on GitHub.

This project adds custom language highlighting for Markdown:

enter image description here

There's a version available for both the standard color scheme and the dark (ZenBurn) theme. After installation, you'll find a new option in the Language dropdown.

enter image description here

Solution 3

If you want to automatically preview Markdown in Notepad++ you can use the HTML Preview plugin (version 1.3 and higher) in combination with a Markdown tool. In the HTML preview plugin you can define a filter (a program that will be executed on a source file automatically before previewing the file).

You can define a filter using a menu option (changing the provided sample file does not work), or manually if you put Filters.ini file in the folder plugins\Config\PreviewHTML. An example of Filter.ini file is enclosed in the Preview plugin archive file available from PreviewHTML web page.

This is an example of Filters.ini file that uses a Python Markdown implementation:

; Content of Filters.ini file
[Markdown]
Extension=.md
Language=Markdown
Command=python -m markdown "%1"

Solution 4

I found a simpler workflow is to use the Markdown extension in Chrome, do your edits in Notepad++, then point Chrome at your file and reload after each change.

There is no need for complex configuration, and it gets the job done for me.

Solution 5

The "Edditoria" GitHub repository has a number of bugs (for example, # inside a link is broken) and hasn't been updated for years. After trying out the most active forks, this one is much better.

Share:
240,748

Related videos on Youtube

srk
Author by

srk

Updated on September 18, 2022

Comments

  • srk
    srk over 1 year

    I love writing in Markdown and would like to be able to write and preview Markdown content in Notepad++.

    Are there any WYSIWYG Markdown plugins for Notepad++?

    • Geoff
      Geoff about 11 years
      It sounds like you want to edit rich text using markdown syntax; Notepad++ is of course just a plain text editor, but which supports syntax highlighting. If you really need offline editing capability, you might want to instead look at a desktop editor that supports it, like this open source one
    • will
      will about 9 years
      Perhaps the 'question' at hand is to find a plug-in to do something like the netbeans markdown plugin; this supplies some syntax highlighting and also has a preview mode. The preview mode can be configured to save the HTML version, which I find quite handy for readme files.
    • Stevoisiak
      Stevoisiak over 6 years
      There is an open issue for native Markdown support on the Notepad++ GitHub repository, but it doesn't seem to have gotten much traction.
    • Shahin Dohan
      Shahin Dohan over 2 years
      Alternative: Use Visual Studio Code. Just found out that it supports md editing natively.
  • srk
    srk about 11 years
    How can I view the preview?
  • Oliver Salzburg
    Oliver Salzburg about 11 years
    @srk: I don't think you can. If you want a proper Markdown editing experience, I would recommend looking at MarkdownPad. Otherwise, you may have to construct a macro maybe to render the document and open it in a browser. But that would be a horrible workflow I guess :\
  • Oliver Salzburg
    Oliver Salzburg about 11 years
    @srk: It's syntax highlighting just as the one I suggested. At least from what I can tell.
  • Tog
    Tog over 10 years
    Please insert the gist or contents of the link. Links break and fade away which means that that part of your answer becomes meaningless to future visitors.
  • RolfBly
    RolfBly about 9 years
    This answer assumes the reader is either familiar enough with NPP_EXEC or willing to wade through its documentation to find out what exactly the script should be and how to get the output of a markdown-to-html converter in a new tab of Notepad++.
  • winner_joiner
    winner_joiner about 9 years
    @RolfBly i hope my Update helps you. this is how i use it, there are surely better or nicer ways. :)
  • RolfBly
    RolfBly about 9 years
    This answer would be better with a few things made clearer. (1) With which menu item one can define a filter? (2) Do you mean the program should take tab X in NPP as input and send output to tab Y in NPP as HTML, which can then be previewed with HTML Preview? Could you specify what exactly is markdown in your command line? I'm trying to get this working with markdown2, but no success yet.
  • RolfBly
    RolfBly about 9 years
    @winner_joiner Works like a charm, thank you!
  • RolfBly
    RolfBly about 9 years
    NPP_RUN $(OUTFILE) ie without chrome, also works. Launches your default browser with c:\temp\md2html.
  • winner_joiner
    winner_joiner about 9 years
    @RolfBly yes is true, internal polices dont allow to change default browser, so i had to add the chrome part. :)
  • pdem
    pdem about 9 years
    It is a little tricky to make this working:1. install python with "pip" (msi installer for python version 3.4.3 does this) 2.install markdown :"pip install markdown" 3. install the version >v1.3 of PreviewHTML, this is important because the plugin manager only provides the v1.2: get it manually from git repo fossil.2of4.net/npp_preview/info/fb02a79e74ace3be 4.create the filter from the menu "plugin/Preview HTML/Edit Filter Definitions" - here paste the Script. And then it works!
  • Mostafa
    Mostafa about 7 years
    it just not work.
  • SAm
    SAm almost 7 years
    Too bad it doesn't support syntax highlights. I need it for highlighting code.
  • nzn
    nzn almost 7 years
    @pdem's instructions work beautifully! To install version 1.3, unzip the downloaded 1.3 files, copy the .dll to the Notepad++/plugins folder and the PreviewHTML folder to the Notepad++/plugins/Config folder and restart Notepad++.
  • tehnicaorg
    tehnicaorg over 6 years
    Last versions of Notepad++ don't include the Plugin Manager anymore. It's easy to install it by copying the required DLL ( github.com/nea/MarkdownViewerPlusPlus#installation )
  • TmTron
    TmTron over 6 years
    seems this has changed in 2018 markdown_npp has not been updated for 5 years, but Edditoria/markdown-plus-plus has been updated only 2 months ago
  • NateS
    NateS over 6 years
    @TmTron Good point, though the original repo has seen only a couple commits in all these years. Even the fork I mentioned didn't work perfectly, but it's something.
  • bruhjustfailing
    bruhjustfailing almost 6 years
    @SAm you can use this in conjunction with the Markdown Syntax plugin with no problems in my experience
  • Eric Eskildsen
    Eric Eskildsen over 5 years
    Default modern currently mistakes bullets for italics (screenshot), but default classic works.
  • Madlozoz
    Madlozoz almost 5 years
    But the markdown parser seems… bad
  • granadaCoder
    granadaCoder over 4 years
    Ok. for me, the "preview" window did not show up on restart of notepad++. There is a new menu item "Plugins / MarkdownViewer++ / MarkdownViewer++ (CNTL SHIFT M) " That got my preview window up and showing.
  • Ben
    Ben over 4 years
    Tip: In the MarkdownViewer++ Options menu you can add Custom CSS to format the backtick code highlighting the same way it does in StackOverflow comments. Just paste this in the CSS field: code { font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,sans-serif; background-color: #eff0f1; }
  • Mario Klebsch
    Mario Klebsch over 3 years
    MarkdownViewerPlusPlus has not been updated for almost three years. There was lots of activity in 2017, but this stopped in May 2018. Unfortunately Markdown-Parser does not understand the markdown syntax, I have to use with Trac. :-(
  • Fabio says Reinstate Monica
    Fabio says Reinstate Monica about 2 years
    @UncleIroh You could make it an answer!