Reference prettier-plugin-markdown-html in your Prettier config:
{"plugins":["prettier-plugin-markdown-html"]}
Options
In addition to Prettier’s built-in options that affect HTML formatting, prettier-plugin-markdown-html offers additional configuration options.
interfacePluginOptions {
/**
* Override the preferred line length for raw HTML fragments in Markdown.
* Unlike `printWidth`, this option does not affect code blocks or other
* Markdown content. Falls back to `printWidth` when unset.
* @defaultundefined
*/
htmlFragmentPrintWidth?: number | undefined;
/**
* Enforce one HTML attribute per line for raw HTML fragments in Markdown.
* Unlike `singleAttributePerLine`, this option does not affect code blocks.
* Falls back to `singleAttributePerLine` when unset.
* @defaultundefined
*/
htmlFragmentSingleAttributePerLine?: boolean | undefined;
/**
* Control whitespace handling for raw HTML fragments in Markdown. Unlike
* `htmlWhitespaceSensitivity`, this option does not affect code blocks.
* Falls back to `htmlWhitespaceSensitivity` when unset.
* @defaultundefined
*/
htmlFragmentWhitespaceSensitivity?: 'css' | 'strict' | 'ignore' | undefined;
}
We found that prettier-plugin-markdown-html demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.
Package last updated on 13 May 2026
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
The White House’s Gold Eagle Initiative aims to coordinate AI-discovered vulnerabilities, validate findings, and accelerate patching across critical software.