Skip to content

Settings

rdipardo edited this page Aug 28, 2026 · 7 revisions

Preview HTML can read the following options from a Settings.ini file:

Options for WebView2 (Microsoft Edge)

Note

  • Since Preview HTML version 1.4.4, these options are applied only when the WebView2 preview panel is enabled. To enable WebView2, the following are equivalent:
[Emulation]
NoEdge=0

; or simply:
; [Emulation]

[Style], [JavaScript], [Scroll]

Note

  • Automatic styles are never loaded if the generated HTML contains linked CSS or a <style> block

  • For HTML with no style, a default CSS file will be loaded even if a Style configuration is missing or empty. To use the default style for light mode and dark mode, the following are equivalent:

[Style]
Disable=0
Extension=*

; or simply:
; [Style]
Section Options Default Description
Style Disable 0 Turn off automatic style sheet loading, including the built-in default CSS files; this overrides any other settings
Extension * Comma-separated list of file extensions; only matching files will be styled; use * to match all files
Filename style.css (in light mode), or style-dark.css (dark mode) A CSS file name, relative to the plugin's assets folder (see example)
JavaScript Disable 0 Turn off automatic script loading; this overrides any other settings
Extension * Comma-separated list of file extensions; scripts will be loaded only in matching files; use * to match all files
Filename "" A JS file name, relative to the plugin's assets folder (see example)
Scroll 1. Sticky 1 Whether or not the preview panel should maintain the current scroll position after a refresh; set to 0 to disable

1. Added in version 1.4.1. Only previews of static HTML files respond to this option. Since version 1.4.2, scroll position is always maintained in previews generated by a custom filter.

Important

All user-defined style sheets and scripts are loaded from a single folder:

Fully installed Notepad++ editions

%AppData%\Notepad++\plugins\Config\PreviewHTML\Static

Portable Notepad++ editions

$(PORTABLE_NPP_DIR)\plugins\Config\PreviewHTML\Static

Example

[Style]
Extension=.md,.rst   ; only used if the active file is Markdown or reStructuredText
Filename=custom.css  ; must be saved as %AppData%\Notepad++\plugins\Config\PreviewHTML\Static\custom.css
                     ; or $(PORTABLE_NPP_DIR)\plugins\Config\PreviewHTML\Static\custom.css

[JavaScript]
Extension=.aspx      ; only used with ASP.NET files
Filename=search.js   ; must be saved as %AppData%\Notepad++\plugins\Config\PreviewHTML\Static\search.js
                     ; or $(PORTABLE_NPP_DIR)\plugins\Config\PreviewHTML\Static\search.js

[Scroll]
Sticky=0             ; do not preserve scroll position

[MathJax], [Katex], [JQuery]

Requires Preview HTML 1.4.6 or later.

Important

To enable any of these options, the Version field must be set to a semantic version string, e.g.,

;
[MathJax]


;
[MathJax]
Version=4
; Version=4.1
; Version=4.1.3
Section Options Required Description
MathJax Version The MathJax library version to use
Components Comma-separated list of MathJax components to include. Defaults to tex-svg
Katex Version The KaTeX library version to use
AutoRender Whether or not to include KaTeX's auto-render extension. Defaults to 1 ("yes")
JQuery Version The jQuery library version to use

Example

[MathJax]
Version=4
Components=tex-mml-chtml,input/tex-base,input/mml,ui/menu

[Katex]
Version=0.17
AutoRender=0

[JQuery]
Version=3.7.1

Global Options

[Emulation], [AutoRefresh]

Note

The default value of these settings will apply even when Settings.ini is empty or does not exist.

Section Option Default Description
Emulation NoEdge 1. 0 Whether or not to disable the WebView2 preview panel; Internet Explorer will always be used when this option is set to 1
Installed IE version 2. Latest IE version available on the host PC, e.g., "11.1882.26100.0" The maximum IE version to include in the emulation options menu; applies only when NoEdge=1
Autorefresh 3. Interval 1000 Number of milliseconds to wait before an automatic refresh; 0 disables automatic refreshes

1. Added in version 1.4.4.

2. Added in version 1.3.1, disabled in versions 1.4.0–1.4.3, restored in version 1.4.4.

3. Added in version 1.2.

Important

[Emulation] options are checked only once at application startup. If you edit these in Notepad++, they will not take effect until the next restart.

Example

[Emulation]
NoEdge=1        ; do not use the MS Edge WebView2 browser, even if it's installed

[Autorefresh]
Interval=2000   ; wait 2 sec. between each automatic refresh

Editing Settings.ini

The path to the configuration file depends on how Notepad++ was installed:

Fully installed Notepad++ editions

%AppData%\Notepad++\plugins\Config\PreviewHTML\Settings.ini

Portable Notepad++ editions

$(PORTABLE_NPP_DIR)\plugins\Config\PreviewHTML\Settings.ini

To make sure you are editing the correct file, do the following:

  • Install the plugin and (re)start Notepad++

  • From the toolbar menu, select Plugins > Preview HTML > Edit settings