Friday, July 9, 2010

Posting code

It seems really weird that blogger doesn't have facilities for posting code honoring linebreaks, whitespace and maybe even syntax highlighting. There are some workarounds where you paste code in some textfield and get html that you're supposed to paste into your blog. I think that sucks.

I edited my template and changed .post-body blockquote to read:

.post-body blockquote {
border:1px dashed #dddddd;
background-color:#eeeeee;
padding:10px;
font-size:9pt;
white-space: pre;
font-family: monospace;
}

Now you can paste your code even using the HTML editor using the quote-button. Of course, it still doesn't do syntax highlighting and neither does it work for HTML, but its a start.

No comments:

Post a Comment