Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1.11 KB

File metadata and controls

27 lines (19 loc) · 1.11 KB

markdown-it-broken-image-placeholder

GitHub license PRs Welcome code style: prettier npm version

markdown-it plugin for replacing broken image link with fallback one.

Usage

Using yarn:

yarn add markdown-it-broken-image-placeholder

Or via npm:

npm install markdown-it-broken-image-placeholder

Then, to enable the feature:

import MarkdownIt from 'markdown-it';
import { brokenImagePlaceholderPlugin } from 'markdown-it-broken-image-placeholder';

const md = new MarkdownIt();

md.use(brokenImagePlaceholderPlugin({ fallbackLink: 'https://image.link' }));