File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ # markdown-it-broken-image-placeholder
2
+ [ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://github.com/LeetCode-OpenSource/markdown-it-broken-image-placeholder/blob/master/LICENSE ) ![ PRs Welcome] ( https://img.shields.io/badge/PRs-welcome-brightgreen.svg ) [ ![ code style: prettier] ( https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat )] ( https://github.com/prettier/prettier ) [ ![ npm version] ( https://img.shields.io/npm/v/markdown-it-broken-image-placeholder.svg?style=flat )] ( https://www.npmjs.com/package/markdown-it-broken-image-placeholder )
3
+
4
+ markdown-it plugin for replacing broken image link with fallback one.
5
+
6
+ ## Usage
7
+
8
+ Using [ yarn] ( https://yarnpkg.com/ ) :
9
+ ``` bash
10
+ yarn add markdown-it-broken-image-placeholder
11
+ ```
12
+
13
+ Or via [ npm] ( https://docs.npmjs.com ) :
14
+ ``` bash
15
+ npm install markdown-it-broken-image-placeholder
16
+ ```
17
+
18
+ Then, to enable the feature:
19
+
20
+ ``` javascript
21
+ import MarkdownIt from ' markdown-it' ;
22
+ import { brokenImagePlaceholderPlugin } from ' markdown-it-broken-image-placeholder' ;
23
+
24
+ const md = new MarkdownIt ();
25
+
26
+ md .use (brokenImagePlaceholderPlugin ({ fallbackLink: ' https://image.link' }));
27
+ ```
You can’t perform that action at this time.
0 commit comments