Follow the instructions of this project.
-
Install Python (I tested it with Python 2.7)
- Make sure you also select pip and Add python to PATH
-
Install the python markdown package:
- Open comand prompt: Press [Win] + [R], type
cmd
and hit [Enter] - Enter
pip install markdown
- You can close the window after the installation is complete
- Open comand prompt: Press [Win] + [R], type
-
Install the Notepad++ plugin Preview HTML
-
Download the archive from the link above (v1.3 or higher, the plugin manager downloads the old v1.2.1!)
-
Extract the archive
-
Move the file PreviewHTML.dll to C:\Program Files (x86)\Notepad++\plugins (or similar)
-
(Re)start Notepad++ and select Plugins > Preview HTML > Edit filter definitions
- If prompted to create a new file, click yes
-
Add the following code:
[Markdown] Extension=.md Language=Markdown Command=python -m markdown "%1"
-
Save the file (make sure it is called filters.ini and not filters.sample.ini)
-
-
Press [Ctrl] + [Shift] + [H] to open the preview window
-
Do all the steps form the basic setup
-
Create a HTML file with the desired CSS styles defined internally (see example file below)
-
Save the file to %AppData%\Notepad++\plugins\config\PreviewHTML\style.htm
-
Open the filters.ini file and change the
Command
line to the following:Command=cmd /c type "%AppData%\Notepad++\plugins\config\PreviewHTML\style.htm" & python -m markdown "%1"
Anyone finding this should know that the MarkdownViewer++ plugin is far superior to this method, both in that it is updated live and makes FAR fewer rendering mistakes. I believe this document was last updated in 2016, so it being 2019 shows how outdated this information is.
I believe the majority of the rendering issues are caused by the python markdown parser, the HTML preview plugin actually works great when given a proper markdown conversion from a different parser.