Upload a JS file as a .txt file in assets then load it with a
Use a CDN like jsdelivr that allows for github assets to be called via the cdn. See https://www.jsdelivr.com/features
Use a hosting platform or any other CDN to serve the resource.
Hi webdev, I am not as technical as you are and don’t know how to make it happen with the instructions you left. Can you please elaborate on how to use code that has over 10,000 characters? Thanks in advance.
Can you link to the code source so I can better advise? If it’s on Github there’s a simple way and I can prepare a code for you that you’ll just need to paste in Webflow.
Hi Vako, thanks for your feedback. Basically, I am looking to implement a code taken from Codepen. The problem is that the JS code is more than 10,000 characters long. Here is the link: https://codepen.io/sanprieto/pen/XWNjBdb
UPDATE: OK, this version is now correct.
I’ve uploaded the JS code externally. You can load it using this code:
Paste this code in the body tag of the page.
Then you’ll need to copy the remaining HTML and CSS snippets from the codepen. HTML should go inside the custom code embed element.
CSS should go in the head tag using the previous page settings method. You’ll need to wrap the CSS between these tags:
<style> /* CSS code goes here */ </style>
I tried it. It works.
Hi Vako, Thanks for your help, it worked! Can you please share how you exported the code? Thanks in advance.
There are two steps:
Tried your first advice, after uploading txt file with some styles, webflow replaced all semicolons with dash. Is that normal?