generated from iamogbz/oss-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(export-element): add export to png feature (#1267)
* feat(export-element): add export to png feature * wip: remove unused parameter * fix: remove unused dependency * fix: update target on mouse up action * wip: add image download link target * wip: use canvas to blob over data url * wip: render clone in page before downloading * fix: properly wrap content for rendering as image * fix: render image at full size before scaling for window fit
- Loading branch information
Showing
4 changed files
with
169 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// rigmarole to get html2canvas types to work with typescript imports | ||
import { default as Html2Canvas } from "html2canvas"; | ||
const html2canvasFn = require("html2canvas") as typeof Html2Canvas; | ||
export { html2canvasFn as html2canvas }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters