Jump to content

Edit code in body text

Recommended Posts

Posted (edited)

Hello, 

 

I'm trying to add some code to one of the blocks in my website, directly in the text. At first, it seems to be working, but a few minutes later, the commands no longer work, and the code shows on the published website. (image attached) Errocdigo-Squarespace.thumb.png.f4f315128426dcf1561fc4e33d64ee71.png

Is there any way that I can edit the text?

Thank you

Edited by JoaoFreire
Posted

First, use this to Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $(".image-slide-title").each(function(){
    $(this).html($(this).text());
  });
});
</script>

Next, try your <br> tag again

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.