Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
GennyFlow is a client-side javascript tool that downloads HTML elements as images.
While this was made to be used with Webflow and its CMS, it is compatible with any js-enabled web environment.
You can see a live example at gennyFlow.com.
gennyFlow
elements are controlled using custom attributes, which you'll be familiar with if you've used Finsweet Attributes.
gf="wrapper"
gf="capture"
gf="slug"
gf="trigger"
gennyFlow
, downloading all capture elements.You can set these when you initialize GennyFlow. You can allow users to set these by putting the user-settable attribute on any type of form input. Be sure the values match what's below (so I recommend things like selects, radio, or checkboxes for items that need to be specific, i.e. format).
You can set these options in several places, here is the order of precedence:
Order of precedence
<input gf="scale-input" value="2">
Attribute (and defaults) | Accepted values | User inputs | |
---|---|---|---|
File Format | gf-format="png" | 'jpg' 'png' 'webp' | gf="format-input" |
Quality (jpg/webp) | gf-quality="1" | 0.0 to 1.0 | gf="quality-input" |
Scale | gf-scale="1" | any number | gf="scale-input" |
Zip Folder Name | gf-zip-name="images" | 'any string' | gf="zip-name-input" |
Include Date, Zip Name | gf-include-date-zip="false" | true false | |
Include Scale, Zip Name | gf-include-scale-zip="false" | true false | |
Include Date, Img Name | gf-include-date-img="false" | true false | |
Include Scale, Img Name | gf-include-scale-img="false" | true false | |
Disable SVG Fix | gf-disable-svg-fix="true" | true false | |
Don't capture element | gf="ignore" | "ignore" |
Upload the gennyFlow-(version number).txt
file in /dist
folder to the Webflow asset manager
.
<script src="Your GennyFlow.txt asset manager URL"></script>
See required elements
above. Create the elements and apply the custom attributes.
gennyFlow
also works outside of Webflow! Here is how it would look on a simple page.
<button type="button" gf="trigger">Download images</button>
<div gf="wrapper">
<div gf="capture">
<div gf="slug">Example image 1</div>
</div>
<div gf="capture">
<div gf="slug">Example image 2</div>
</div>
</div>
<script src="gennyflow-version-here.js"></script>
gennyFlow
per page.HTML2Canvas
doesn't support some CSS properties. See full list here.gennyFlow
must be hosted in your Webflow asset manager
, and all images in your designs need to be hosted through there as well (unless you're using a CORS proxy, see below).HTML2Canvas
has issues with some SVG files. You may need to use rasterized images, or utilize something like inline-svg.HTML2Canvas
does not like exporting scaled up css background-image
's. If you're exporting at a scale higher than 1, consider using an image element with absolute positioning instead.All image files that are inside your capture elements must be hosted from the same origin as your gennyFlow.js
file due to CORS.
To avoid CORS issues, you can
gennyFlow
.txt
in the Webflow asset managerFAQs
Easily download one or more DOM elements as images in Webflow
The npm package gennyflow receives a total of 6 weekly downloads. As such, gennyflow popularity was classified as not popular.
We found that gennyflow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.