This is a plugin for the Gedit text editor, previewing .md files in the side pane (F9) or the bottom (Ctrl+F9) pane.
- show a preview of a file
- dynamically update the preview
- zoom in or out on the preview
- search in the preview
- open links and images
This works for Markdown, HTML, and SVG files.
You can print the preview, or export it:
- if
pandoc
is installed on your system, you can export to any format it supports- a stylesheet can be applied to most file formats
- be careful if you want to export to PDF: pandoc doesn't come with all necessary dependencies by default
- if only
python3-markdown
is installed, you can export to HTML- a stylesheet can be applied
python3-markdown
extensions can be used (including third-party extensions like these great ones
With the preview in the side pane, menu opened | With the preview in the bottom pane, searching |
---|---|
- For Arch Linux and its derivatives: the AUR package is named
gedit-plugin-markdown_preview
.
Even if you install the plugin with a package manager, you may like to read the following sections, since installing optional dependencies will enable new features of the plugin.
- Dependencies. Be sure to have these packages before installing the plugin:
gedit
(≥3.22)gir1.2-webkit2-4.0
python3-markdown
orpandoc
- if you want to export to PDF with pandoc, you'll need at least
pdflatex
andlmodern
. Those are provided bytexlive
packages whose names vary depending on the distribution. Warning: the version provided by Debian is sadly broken (some error message about xcolor.sty). libglib2.0-bin
(needed for the installation script only). This is the package name on debian-based distros, it may differ on your system.
- Download the ZIP of the last release.
- Extract the archive.
- Open the project's folder in a terminal.
- Run
./install.sh
— it can be executed as root (system-wide installation) or as a normal user (user-wide installation).
The plugin is now installed and has to be enabled:
- Open Gedit's preferences.
- Go to the "Plugins" tab.
- Enable the "Markdown Preview" plugin.
The plugin's options can be accessed…
- from Gedit's preferences → Plugins → Markdown preview → Preferences
- or with the plugin's "3-dots menu" → Options
- Position of the preview (left side or bottom)
- If you want the plugin to understand relative paths (for links and pictures). This is not recommended if you use special characters in filenames (some versions of WebKit2GTK can't load URIs with special characters for some reason)
The preview can be generated with pandoc or python-markdown.
A stylesheet (CSS file) can be applied to the preview (markdown files only, it will not be loaded for HTML files).
A set of extensions is provided natively with python-markdown. You can enable or disable them depending on your needs.
Great third-party extensions exist too, and once installed they can be added manually to the list.
- English
- French
- Dutch