Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

To export JavaScript, HTML, or CSS:

  1. Visit your Webflow site: https://webflow.com/design/yoursite

  2. Press shift + e to open the export window.

  3. Open the developer console (e.g. command + option + j in Chrome)

  4. Paste the following code into Webflow (yes, Webflow tells you not to paste code in there — the below snippets won’t grant anyone access to your Webflow account):

HTML

const htmlText = document.querySelectorAll('code')[0].innerText
const htmlDummy = document.createElement('textarea')
document.body.appendChild(htmlDummy)
htmlDummy.value = htmlText
htmlDummy.select()
document.execCommand('copy')
document.body.removeChild(htmlDummy)

CSS

const cssText = document.querySelectorAll('code')[1].innerText
const cssDummy = document.createElement('textarea')
document.body.appendChild(cssDummy)
cssDummy.value = cssText
cssDummy.select()
document.execCommand('copy')
document.body.removeChild(cssDummy)

JavaScript

const jsText = document.querySelectorAll('code')[2].innerText
const jsDummy = document.createElement('textarea')
document.body.appendChild(jsDummy)
jsDummy.value = jsText
jsDummy.select()
document.execCommand('copy')
document.body.removeChild(jsDummy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.