1.1.7 • Published 10 months ago

markdown-it-pdf v1.1.7

Weekly downloads
47
License
MIT
Repository
github
Last release
10 months ago

markdown-it-pdf

PDF viewer for markdown-it

NOTE:
THIS IS NOT PLUGIN TO CONVERT MARKDOWN TO PDF.

Installation

npm install markdown-it-pdf

Usage

import markdownIt from "markdown-it";
import markdownItPdf from "markdown-it-pdf";
const md = new markdownIt("default", {
  html: true
});
md.use(markdownItPdf);
// You can also write like this.
// md.use(require(markdown-it-pdf));
const pdfUrl =
  "https://0eta0.github.io/markdown-it-pdf/test.pdf";

md.render(`@[pdf](${pdfUrl})`);

Result on the chrome

'Result'

Options

md.use(require(markdown-it-pdf), {
  showUrl: true
});

If you add option "showUrl", the URL link will attach after PDF viewer.

Result on the chrome

'Result'

Development

Test

npm test
1.1.7

10 months ago

1.1.6

2 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.0

4 years ago

1.0.0

5 years ago