To export JavaScript, HTML, or CSS:
-
Visit your Webflow site: https://webflow.com/design/yoursite
-
Press
shift
+e
to open the export window. -
Open the developer console (e.g.
command
+option
+j
in Chrome) -
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):
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)
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)
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)