â–Ľ
Streaming live at 10am (PST)

Character Limit

Why does custom code cannot exceed more then 10000 characters

You can upload a txt file to assets, grab the CDN URI of that asset, then use that as the src for your script tag. Just be sure to add text=“text/javascript”. Place it in the head before body or before body close if it is dependent on jQuery

<script src="your-asset-uri" type="text/javascript"></script>
3 Likes

Oh geez! I never thought of that! I was always going somewhere else and uploading it to GitHub or others…

@Jeandcc - The only issue is you can’t update the code since the text file can’t be updated. You have to replace (upload) the asset and then update the src reference. Best used for static assets that don’t change. I personally self host where I can revise/replace/restrict since I have lots of servers and cloud accounts.

1 Like

@webdev That definitely makes sense Jeff… Maybe I’ll work mixing both solutions:

Host it somewhere else while in development, and then when I"m about to deliver the project, I’ll just get everything into a .txt file and upload it to webflow (since I’m not going to be changing that anytime soon).

Thanks for your idea though, really useful

1 Like

Hey @webdev

Sorry, I’m still learning my ways with WF.

Could you tell me how to get the CDN URI? and what it is? Just confused on that part.

Thank you! :slight_smile:

When you view an asset in the asset panel there is a small icon that is linked to the URI. Copy that.

Hi,

I’m struggling to understand how it links to the area I want my embedded code to sit.

I’ve created the text file and added the line of code as suggested, but how do I now get that text file to work in the area I need it too?

Apologies if I’ve not made my self clear!

Here’s a link to the dev site with a version of the embedded code.

regards