1.1.0 • Published 5 years ago

markdown-it-broken-image-placeholder v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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' }));