Jump to content
Go to solution Solved by paul2009,

Recommended Posts

Posted

I've been doing this multiple times and it's working before. I wonder what happened and it's not working anymore.

Issue: I copied and pasted the code from the Markdown, then the layout is different. What do you think is the cause and how can I make the new markdown the same as the old ones. Whenever I try to edit the old ones, it's not working anymore and becomes different as well, so I can't edit that either.

Also, I tried looking for the code injection for the Markdown and I found this injected in the footer menu. It might be helpful if someone knows how to do it. Here's the code injection:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>

<script>
$(window).load(function(){
$('.markdown-block .sqs-block-content h2').css('cursor','pointer');
$(".markdown-block .sqs-block-content h2").nextUntil("h2").slideToggle();
$(".markdown-block .sqs-block-content h2").click(function() {
$(this).nextUntil("h2").slideToggle();
});
});
</script>

<script src="/s/mega-menu.js"></script>
 

Screenshot 2024-07-02 at 12.25.56 PM - old code.png

Screenshot 2024-07-02 at 12.28.45 PM - new one.png

Posted

 

These closing brackets > are problematic, and each of the opening <p> should have a corresponding closing </p>

I don't know for sure why you are having problems, but coding errors regularly cause unexpected issues.

image.thumb.png.b1d479f4cb31f005f4d053f7256e629b.png

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

I just copy & pasted the code from previous ones. I wonder why its' working currently, but not working anymore when you edit it.

Posted
10 hours ago, Merylle said:

I just copy & pasted the code from previous ones. I wonder why its' working currently, but not working anymore when you edit it.

The code needs fixing before you copy/paste, just because the first one works, doesn't mean that the errors won't cause problems on the second one.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

Taking the custom code out of the equation Squarespace recently made changes to how markdown blocks work. So, how they worked before is not how they work now. Any custom code would need to take into account how markdown blocks work now.

I have no solution just an observation of why things may have gone wrong.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

  • Solution
Posted (edited)
On 7/2/2024 at 7:42 PM, Merylle said:

What do you think is the cause and how can I make the new markdown the same as the old ones.

@Merylle As @creedon explained above, the cause is that Squarespace made changes to the Markdown Block. When you add a new Markdown Block to the website, or you simply edit the content of an existing Markdown Block, your old code won’t work because it is not supported.

However, you can still achieve the same look in a new Markdown Block, you'll just need to make a few changes to the way you were formatting the content. Instead of adding HTML  (divs, spans, classes and inline styles), just add the basic text to the Markdown Block. Then add the header, using two hash characters to indicate it is a H2 heading, like this example:

image.gif.961a9714e94afe3624068514ed1e5019.gif

 

You'll then need to make a few changes to your Custom CSS so that it is applied to the new H2 heading without the div reference. By adding all the styles (arrows, box, font formatting and so on) to Custom CSS, this will keep the markdown very clean and easy for anyone to update.

Did this help? Please give feedback by clicking an icon below  ⬇️

Edited by paul2009

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted
8 hours ago, paul2009 said:

@Merylle As @creedon explained above, the cause is that Squarespace made changes to the Markdown Block. When you add a new Markdown Block to the website, or you simply edit the content of an existing Markdown Block, your old because it is not supported.

However, you can still achieve the same look in a new Markdown Block, you'll just need to make a few changes to the way you were formatting the content. Instead of adding HTML  (divs, spans, classes and inline styles), just add the basic text to the Markdown Block. Then add the header, using two hash characters to indicate it is a H2 heading, like this example:

image.gif.961a9714e94afe3624068514ed1e5019.gif

 

You'll then need to make a few changes to your Custom CSS so that it is applied to the new H2 heading without the div reference. By adding all the styles (arrows, box, font formatting and so on) to Custom CSS, this will keep the markdown very clean and easy for anyone to update.

Did this help? Please give feedback by clicking an icon below  ⬇️

Thank you so much! This make sense to me now.

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.