JSPM

markdown-it-images-preview

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 106
  • Score
    100M100P100Q92360F
  • License MIT

A markdown-it plugin to preview local images.

Package Exports

  • markdown-it-images-preview

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (markdown-it-images-preview) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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