markdown-it-images-preview
v1.0.1
Published
A markdown-it plugin to preview local images.
Downloads
1,068
Readme
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');