Juri Strumpflohner
Juri Strumpflohner Juri is a full stack developer and tech lead with a special passion for the web and frontend development. He creates online videos for Egghead.io, writes articles on his blog and for tech magazines, speaks at conferences and holds training workshops. Juri is also a recognized Google Developer Expert in Web Technologies

Syntax highlighting on Blogger

1 min read

I recently found a JavaScript and CSS based syntax highlighting framework called dp.SyntaxHighlighter. The script works perfectly and it is really cool to have such a feature totally for free. I find it really useful, especially for people - like me - who want to publish code since with syntax highlighting it is much more readable. The problem is only that Blogger doesn't support dp.SyntaxHighlighter. Using the framework you have to put your code inside a text-area:
(yes I'm using my old way to post code-pieces :) )
<textarea name="code" class="java">
public class Test{
It should look something like this. So when you want to do this on your Blogger Blog, you have to switch in the Post-Editor to the "Edit HTML" part and write the code of the textarea. However then, when you switch back to "Compose" mode, the Editor will automatically replace all new-line characters inside the textarea to <br/> statements which clearly results in an extremely messy looking, basically unreadable code.

I hope this will be fixed somehow in the near future such that one can use syntax-highlighting tools here. However, what I will do (as soon as I find some free time :) ) is to use dp.SyntaxHighlighter to enhance my Code Notebook's Web Portal.
Questions? Thoughts? Hit me up on Twitter
comments powered by Disqus