How to use the html-to-image.toSvgDataURL function in html-to-image

To help you get started, we’ve selected a few html-to-image examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hammerlab / pileup.js / src / main / pileup.js View on Github external
toSVG(filepath: ?string): Promise {
        if (reactElement === null) {
          throw 'Cannot call toSVG on a destroyed pileup';
        }

        return htmlToImage.toSvgDataURL(el)
          .then(function (svg) {
              if (filepath != null) {
                  window.saveAs(svg, filepath);
              }
              return svg;
          });
    },
    destroy(): void {

html-to-image

Generates an image from a DOM node using HTML5 canvas and SVG.

MIT
Latest version published 2 years ago

Package Health Score

77 / 100
Full package analysis