I’ve been using Blogger as my blogging engine for a couple of weeks. I’ve been quite impressed at how easy it makes it to update your blogs look and feel and how free you are with the HTML and semantic layout of the pages.
One thing that seemed to be missing was allowing developers to copy and paste code into their blogs and allow other users to copy and paste the code from the blog into their own code.
One thing that seemed to be missing was allowing developers to copy and paste code into their blogs and allow other users to copy and paste the code from the blog into their own code.
Adding Syntax Highlighter to Blogger Template
- Copy the following code
- paste it into your Blogger Template inside </head> tag
- Save the template
- now start creating code blocks in your existing or new Blog entries.
- There are 2 ways to add a code block using syntaxhighlighter
Using the Script tag
Using the Pre tag
// Comment
public class Testing {
public Testing() {
}
public void Method() {
/* Another Comment
on multiple lines */
int x = 9;
}
}Guys, don’t get irritated it might not work in post preview. So, please publish your blog and then test this code.@AskmeSiebel
Thanks for subscribing to SimplySiebel.