Jump to content

Including HTML and Javascript in one block to integrate an API

Recommended Posts

Hi 

I'm looking for a way to integrate Current RMS API into my site. I have seen the code block but would need to have Javascript and HTML inside on block to do this but it seems that you can only have one type of code per block.

Has anyone every integrated an API into squarespace with Javascript before?

 

Cheers!

Link to comment
  • Replies 2
  • Views 338
  • Created
  • Last Reply

You can have multiple types of code inside a code block. Just wrap them correctly. 

<script>  .... </script>
<style> ... </style>

 

I'm Colin Irwin aka silvabokis.  I've been a Squarespace designer & developer since 2013. 
I remember when it was all wild prairies round these here parts. 🐃🤠
Advice I give on here is free, though I may sometimes post an affiliate link or promote something I've written.
That reminds me.. ..you might want to check out my
Squarespace template finder or have a look at my other Squarespace tips
Speaking of tips, 💲I've got a tip jar that you're welcome to throw a few quid into if you think I've helped you. 
If you're looking for a Squarespace developer 
Book a chat or Drop me a line - first meeting is always free  

 

Link to comment

The dropdown in code blocks is a bit misleading.

This explains what it does:

image.png.fa78da3fbca3d154b6750980f4dde337.png

 

I'm Colin Irwin aka silvabokis.  I've been a Squarespace designer & developer since 2013. 
I remember when it was all wild prairies round these here parts. 🐃🤠
Advice I give on here is free, though I may sometimes post an affiliate link or promote something I've written.
That reminds me.. ..you might want to check out my
Squarespace template finder or have a look at my other Squarespace tips
Speaking of tips, 💲I've got a tip jar that you're welcome to throw a few quid into if you think I've helped you. 
If you're looking for a Squarespace developer 
Book a chat or Drop me a line - first meeting is always free  

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.