I have been using Alex Gorbatchev Syntax Highlighter for a long while now . someone requested me to write an article about using this syntax highlighter in blogger so here i go .
Select a theme for the syntax highlighter , those links have previews of the theme.
After adding those codes now it's time to set your theme to the syntax highlighter , in the third line of code that i gave before . this parameter is what i meant
now after styles/ add the theme style , you can see the theme style right after the theme preview link . for example i have selected shThemeRDark.css then my parameter would look like this
Select a theme for the syntax highlighter , those links have previews of the theme.
- Default - shThemeDefault.css
- Django - shThemeDjango.css
- Eclipse - shThemeEclipse.css
- Emacs - shThemeEmacs.css
- Fade To Gray - shThemeFadeToGray.css
- Midnight - shThemeMidnight.css
- RDark - shThemeRDark.css
After adding those codes now it's time to set your theme to the syntax highlighter , in the third line of code that i gave before . this parameter is what i meant
now after styles/ add the theme style , you can see the theme style right after the theme preview link . for example i have selected shThemeRDark.css then my parameter would look like this
Now you have successfully added the syntax highlighter now save your template and now we will test the syntax highlighter . you cannot just add the code and let it define the language , you should define the language in the tag . you can see what language we can highlight from here . coming to the point i will show you how to syntax highlight a java hello world program .
go to the HTML tab in your post and find where you want the syntax highlighter to be and here we go
replace ____ with your language name and replace codes with your codes and that's how it works . here is a sample of the syntax highlighter.
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } }Thanks For Reading , Have A Great day .
4 comments
Thanks dude for creating an article on this...
ReplyBut Still I can't manage this on my website.
I have used new HTML box so that I can type your codes and so I typed too...
but I can't understand what to type at the _____ (language)
I mean here I have to type English or VB.Net
I try this too but nothing happens....
If possible then please send me the Video Tutorial link.
this is how you type the code
Replyhttp://ultimateprogrammingtutorials.blogspot.com/p/blog-page.html
Run website on Offline mode Using UpUp Javascript Framework
ReplyAngularJS LazyTube directive
Scan Uploaded File using VirusTotal Java Library
Get Data From Database Using AngularJS in JSP
PrimeFaces vs RichFaces vs IceFaces in JSF
PDF Reader Android SDK
Diference - JavaFx vs Swing
Great Article
ReplyOnline Java Training
Java Training Institutes in Chennai
Java Training in Chennai
Post a Comment
Note: Only a member of this blog may post a comment.