Markdown preview for MarkEdit that leverages markedit-api.
Copy dist/markedit-preview.js to ~/Library/Containers/app.cyan.markedit/Data/Documents/scripts/
. Details here.
Use dist/lite/markedit-preview.js if you don't need mermaid, katex and highlight.js, it's much smaller (4 MB vs 160 KB).
Once installed, restart MarkEdit to apply the changes.
This extension automatically checks for updates and notifies you when a new version is available.
Run yarn install && yarn build
to build and deploy the script.
To build the lite version, run yarn build:lite
instead.
Access it from the Extensions
menu in the menu bar, or use the keyboard shortcut Shift–Command–V.
To display local images, please ensure you're using MarkEdit 1.24.0 or later and follow the guide to grant file access.
This extension applies the github-markdown styling. You can customize the appearance by following the customization guidelines.
The preview pane can be styled using the markdown-body
CSS class.
In settings.json, you can define a settings node named extension.markeditPreview
to configure this extension, default settings are:
{
"extension.markeditPreview": {
"autoUpdate": true,
"syncScroll": true,
"changeMode": {
"modes": ["side-by-side", "preview"],
"hotKey": {
"key": "V",
"modifiers": ["Command"]
}
},
"markdownIt": {
"preset": "default",
"options": {}
}
}
}
autoUpdate
: Whether to enable automatic update checks.syncScroll
: Whether to enable scroll synchronization.changeMode.modes
: Define available preview modes for the "Change Mode" feature.changeMode.hotKey
: Assign keyboard shortcuts for mode switching. See the specification here.markdownIt.preset
: Override the default markdown-it preset.markdownIt.options
: Customize markdown-it options.
Extension settings require MarkEdit 1.24.0 or later.