Skip to content

CHENXCHEN/markdown-it-images-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

markdown-it-images-preview

A markdown-it plugin to preview local images.

Install

npm install markdown-it-images-preview --save

Use

var md = require('markdown-it')();
var miip = require('markdown-it-images-preview');
md.use(miip);

how to add image:

md.image_add('./123', file_binary);
// file_binary = "data:image/png;base64,iVBORw0KGgoA......"

how to preview image:

md.render('![image](./123)');

how to delete image:

md.image_del('./123');

About

A markdown-it plugin to preview local images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published