Jump to content

CPU

Member
  • Posts

    1
  • Joined

  • Last visited

CPU's Achievements

Level 1

Level 1 (1/20)

0

Reputation

  1. I ran into the same issues here. When you inject a custom script the "Edit" button gets broken and you can't use the page any more. However, I found a workaround. If you conditionally inject your script into the page whenever it's NOT inside of an iframe, then you can safely use the Squarespace editor. <script> // If the current page isn't in an iframe then run the code if (window.top === window.self) { var script = document.createElement('script'); script.src = 'YOUR SCRIPT URL HERE'; // Replace with your script's URL document.head.appendChild(script); } </script> Now you can still use the Squarespace editor. However you wont be able to preview your custom code in the editor. I just keep the actual page open in a new tab to test things out. Hope this helps!
×
×
  • 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.