vinsworldcom / NppMarkdownPanel

Lightweight Notepad++ plugin to preview Markdown files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Markdown Panel

Plugin to preview Markdown, HTML and other files in Notepad++

  • lightweight plugin to preview markdown and HTML within Notepad++
  • displaying rendered markdown in HTML with embedded IE11
  • can save rendered HTML to a file
  • Dark mode support

Current Version

The original version can be found here

I forked UrsineRaven's repo because it had some desirable updates and the original did not respond to issues or pull requests in a timely fashion.

My (VinsWorldcom) changes can be found here

The plugin renders Markdown as HTML and provides a viewer. The plugin can also render HTML documents. Additionally, 10 filters can be created manually in the configuration file to render documents to HTML for viewing.

For example:

[Filter0]
Extensions=pl,pm
Program=pod2html.bat
Arguments=--css C:\notepad++\plugins\MarkdownPanel\style.css --cachedir %TEMP%

will render Perl POD to HTML and display in the viewer panel. There are some limitations with filters. The rendered views do not synchronize scrolling no matter what the plugin menu setting is and they do not update "live" with typing, only update after document save.

Prerequisites

  • .NET 4.5.2 or higher

Installation

Manual Installation

Create the folder "MarkdownPanel" in your Notepad++ plugin folder (e.g. "C:\Program Files\Notepad++\plugins") and extract the appropriate zip (x86 or x64) to it.

It should look like this:

pluginfolder

Usage

After the installation you will find a small purple markdown icon in your toolbar. Just click it to show the markdown preview. Click again to hide the preview. Thats all you need to do ;)

npp-preview

Settings

To open the settings for this plugin: Plugins -> Markdown Panel -> Settings

open-settings

  • CSS File

    This allows you to select a CSS file to use if you don't want the default style of the preview

  • Dark mode CSS File

    This allows you to select a Dark mode CSS file. When the Notepad++ dark mode is enabled, this Css file is used. When no file is set, the default dark mode Css is used.

  • Zoom Level

    This allows you to set the zoom level of the preview

  • Automatic HTML Output

    This allows you ot select a file to save the rendered HTML to every time the preview is rendered. This is a way to automatically save the rendered content to use elsewhere. Leaving this empty disables the automatic saving.
    Note: This is a global setting, so all previewed documents will save to the same file.

  • Markdown Extensions

    A comma-separated list of file extensions to recognize as Markdown (default = md,mkd,mdwn,mdown,mdtxt,markdown)

  • HTML Extensions

    A comma-separated list of file extensions to recognize as HTML (default = html,htm)

    Note: Adding xml to this list will "render" XML files in the viewer if they at least have a valid XML header <?xml version="1.0"?>.

  • Show Toolbar in Preview Window

    Checking this box will enable the toolbar in the preview window. By default, this is unchecked.

  • Suppress Script Errors

    Suppress the annoying popups about script errors when this is really meant to be just a viewer, not a full-blown Browser. HINT: To see scripts "run properly", open in a real browser.

Preview Window Toolbar

  • Save As... (save-btn)

    Clicking this button allows you to save the rendered preview as an HTML document.

Synchronize with caret position

Enabling this in the plugin's menu (Plugins -> NppMarkdownPanel) makes the preview panel stay in sync with the caret in the markdown document that is being edited.
This is similar to the Synchronize Vertical Scrolling option of Notepad++ for keeping two open editing panels scrolling together.

Synchronize on vertical scroll

Enabling this in the plugin's menu (Plugins -> Markdown Panel) attempts to do a better job at synchronizing scrolling between the preview panel and the document that is being edited without the need for caret movement (in other words, just using scrollbars should sync too).

License

This project is licensed under the MIT License - see the LICENSE.txt file for details

About

Lightweight Notepad++ plugin to preview Markdown files

License:MIT License


Languages

Language:C# 96.1%Language:CSS 2.2%Language:HTML 1.6%Language:PowerShell 0.1%