1. Edit your blog template.
2. Find the
tag.
3. Paste the fragment below before the tag you found above
(NOTE: this is my custom helper and will load js from my github cdn,
you can modify it to create your own as needed)
4. Save template
Done
(It seems there is an autoloader feature but that page not works well so
I wrote my own.)
References:
My testing files
SyntaxHighlighter-themes
SyntaxHighlighter-configuration
Monday, February 16, 2015
Friday, February 13, 2015
Use SyntaxHighlighter with Custom Helper
Simple Note
Use a helper js file to load required js/css files for you.
Samples
testHelper.html
shHelper.js
Use a helper js file to load required js/css files for you.
Samples
testHelper.html
shHelper.js
Thursday, February 12, 2015
Use SyntaxHighlighter to Highlight Code
Simple Note:
Test File:
test.html
Result:
Reference:
http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html
Test File:
test.html
Result:
Reference:
http://alexgorbatchev.com/SyntaxHighlighter/manual/installation.html
Subscribe to:
Posts (Atom)