1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-09 08:45:55 +02:00
joplin/packages/htmlpack
renovate[bot] 0d32570c9e
Update dependency fs-extra to v11.1.1 (#7996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-30 20:11:29 +00:00
..
src Desktop: Fixes #5879 (Regression): Fixed exporting notes that contain Mermaid diagrams as PDF or HTML 2021-12-19 11:55:18 +01:00
.gitignore
package.json Update dependency fs-extra to v11.1.1 (#7996) 2023-03-30 20:11:29 +00:00
README.md
tsconfig.json

HTMLPACK

Pack an HTML and all its JavaScript, CSS, image, fonts, and external files into a single HTML file. JavaScript and CSS is embedded in STYLE and SCRIPT tags, while all other files and images are converted to dataUri format and embedded in the document.

Usage

import htmlpack from '@joplin/htmlpack';
htmlpack('/path/to/input.html', '/path/to/output.html');

Notes

  • The script works in synchronous way so it will block the calling process while running.
  • No security check on what's included.

License

MIT