Skip to content

Instantly share code, notes, and snippets.

@alexiglesias93
Last active February 14, 2023 11:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexiglesias93/6a53936ed8820542f38781b7341d0e68 to your computer and use it in GitHub Desktop.
Save alexiglesias93/6a53936ed8820542f38781b7341d0e68 to your computer and use it in GitHub Desktop.
Get From Webflow
document.addEventListener('copy', ({ clipboardData }) => {
const webflowData = clipboardData.getData('application/json');
const type = 'text/plain';
const blob = new Blob([webflowData], { type });
const data = [
new ClipboardItem({
[type]: blob,
}),
];
navigator.clipboard.write(data);
console.log(webflowData);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment