Configuration Options
PasteMD provides a rich set of configuration options, allowing you to customize its behavior according to your needs.
Configuration File Location
Windows
C:\Users<Username>.pastemd\config.jsonmacOS
~/Library/Application Support/PasteMD/config.jsonQuick Access
You can quickly open the configuration file from the system tray menu:
- Right-click the tray icon
- Select "Edit Configuration File"
- The configuration file will open in your default text editor
Full Configuration Example
{
"hotkey": "<ctrl>+<shift>+b",
"pandoc_path": "pandoc",
"reference_docx": null,
"save_dir": "~/Documents/pastemd",
"keep_file": false,
"notify": true,
"enable_excel": true,
"excel_keep_format": true,
"no_app_action": "open",
"md_disable_first_para_indent": true,
"html_disable_first_para_indent": true,
"html_formatting": {
"strikethrough_to_del": true
},
"move_cursor_to_end": true,
"Keep_original_formula": false,
"language": "zh",
"enable_latex_replacements": true,
"fix_single_dollar_block": true,
"pandoc_filters": []
}Configuration Options Explained
Basic Settings
hotkey
- Type: string
- Default:
"<ctrl>+<shift>+b" - Description: Global hotkey configuration
Supported modifier keys:
<ctrl>– Ctrl key (mapped to Cmd on macOS)<shift>– Shift key<alt>– Alt key (Option on macOS)<cmd>– macOS only, Command key<win>– Windows only, Windows key
Examples:
"hotkey": "<ctrl>+<shift>+v"
"hotkey": "<ctrl>+<alt>+m"
"hotkey": "<cmd>+<shift>+b" // macOSRecommendation
Use a combination with at least two modifier keys to avoid conflicts with common shortcuts.
language
- Type: string
- Default:
"zh" - Options:
"zh"|"en" - Description: UI language setting
Restart the application after changing the language.
notify
- Type: boolean
- Default:
true - Description: Whether to display system notifications
Notification contents:
- Success messages
- Error messages
- Application detection results
Pandoc Settings
pandoc_path
- Type: string
- Default:
"pandoc" - Description: Path to the Pandoc executable
Default behavior: Pandoc is resolved from the system PATH.
Custom paths:
// Windows
"pandoc_path": "C:\\Program Files\\Pandoc\\pandoc.exe"
// macOS
"pandoc_path": "/usr/local/bin/pandoc"
// Relative path (relative to PasteMD executable)
"pandoc_path": "./third_party/pandoc/pandoc"Note
On Windows, backslashes must be escaped (\\) or replaced with forward slashes (/).
reference_docx (usually not needed)
- Type: string | null
- Default:
null - Description: Reference DOCX template path
Using a reference template allows you to:
- Apply custom styles (headings, body text, code blocks, etc.)
- Configure page layout (margins, headers, footers)
- Unify fonts and colors
Examples:
"reference_docx": "~/Documents/my-template.docx"
"reference_docx": "C:/Users/YourName/template.docx"How to create a reference template:
- Create a document in Word
- Configure the desired styles (Heading 1–6, Body Text, Code, etc.)
- Save it as a
.docxfile - Specify the path in the configuration
pandoc_filters
- Type: array of strings
- Default:
[] - Description: Custom Pandoc filter list
Pandoc filters are scripts (Lua, Python, etc.) used to extend or modify conversion behavior.
Example:
"pandoc_filters": [
"mermaid-filter",
"~/filters/custom-filter.lua"
]See Custom Filters for details.
File Management
save_dir
- Type: string
- Default:
"~/Documents/pastemd" - Description: Directory where converted files are saved
Supported path formats:
~expands to the user home directory- Relative paths (relative to the configuration file directory)
- Absolute paths
Examples:
"save_dir": "~/Desktop/PasteMD"
"save_dir": "D:/Work/Documents"keep_file
Type: boolean
Default:
falseDescription: Whether to keep generated files after insertion
false: Temporary files are deleted automatically after insertiontrue: Files are kept in thesave_dirdirectory
Use cases
false(default): Daily usage, reduces disk cluttertrue: Archiving converted files or debugging issues
Excel Table Settings
enable_excel
Type: boolean
Default:
trueDescription: Enable automatic Excel table pasting
true: When a Markdown table is detected and Excel is the active app, it is converted to native Excel formatfalse: Excel functionality is disabled
excel_keep_format
- Type: boolean
- Default:
true - Description: Preserve formatting when pasting into Excel
Preserved formatting (when true):
Bold:
**text**→ Bold cellsItalic:
*text*→ Italic cellsStrikethrough:~~text~~→ StrikethroughCode:`code`→ Gray background + monospace fontHyperlinks:
[text](url)→ Clickable linksfalse: Only plain text is inserted, no formatting
Formatting Options
md_disable_first_para_indent
- Type: boolean
- Default:
true - Description: Disable first-paragraph indentation for Markdown conversion
html_disable_first_para_indent
- Type: boolean
- Default:
true - Description: Disable first-paragraph indentation for HTML conversion
html_formatting
- Type: object
- Description: HTML preprocessor formatting options
Sub-options:
strikethrough_to_del
- Type: boolean
- Default:
true - Description: Convert
~~to<del>tags
Some websites do not render ~~ as strikethrough properly and instead show it as plain text. Enabling this option ensures correct strikethrough rendering.
Example:
"html_formatting": {
"strikethrough_to_del": true
}move_cursor_to_end (Windows only)
Type: boolean
Default:
trueDescription: Move the cursor to the end after insertion
true: Cursor moves to the end of inserted content for continued typingfalse: Cursor stays at the beginning of the inserted content
Math Formula Settings
Keep_original_formula
Type: boolean
Default:
falseDescription: Keep original LaTeX formulas instead of converting to MathML
false(default): Formulas are converted to Office MathML for perfect renderingtrue: Formulas remain as$...$text for manual editing
Use cases:
- When you want to manually edit formulas in Word
- Temporary workaround if formula conversion fails
enable_latex_replacements
- Type: boolean
- Default:
true - Description: Enable LaTeX compatibility fixes
Automatically fixes non-standard LaTeX syntax commonly produced by AI tools, for example:
\kern→\qquad(Pandoc does not support\kern)
fix_single_dollar_block
- Type: boolean
- Default:
true - Description: Automatically fix block-level formulas wrapped with single
$
Some AI tools incorrectly wrap block formulas with $...$ instead of $$...$$. This option detects and fixes them automatically.
Detection criteria:
- The formula occupies a single line
- Wrapped with single
$ - Formula length exceeds a threshold
Example:
# Original (incorrect)
$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$
# Automatically fixed to
$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$Fallback Behavior
no_app_action
- Type: string
- Default:
"open" - Options:
"open"|"save"|"clipboard"|"none" - Description: Behavior when no target application is detected
Option details:
| Value | Behavior | Use case |
|---|---|---|
open | Automatically open Word and insert content | Daily usage (recommended) |
save | Save as a file to save_dir only | Batch file conversion |
clipboard | Convert to rich text and copy to clipboard | Paste into other apps |
none | Show notification only, no action | Restricted environments |
Example:
"no_app_action": "save"Applying Configuration Changes
By Editing the Configuration File
Restart PasteMD after editing.
Via Settings UI or Tray Menu
Changes are applied automatically without restarting.
Troubleshooting
Configuration File Corrupted
Check whether the JSON syntax is valid
Restore default configuration:
- Delete the configuration file; the app will regenerate it automatically
Configuration Not Taking Effect
- Check logs for error messages
- Try restarting the application
More Information
- Advanced Features – Custom Pandoc filters
- GitHub – Source code and issue tracking
