Friday, January 19, 2018

Blogger Posts - Adding a Code Box

This is a quick post I wanted to make, detailing how to add a code box to Blogger....something I've wanted to do for a while now.  Since Blogger allows users to easily toggle between the "Compose" and "HTML" post views, adding a code box can be easily achieved with the following bit of code:

<textarea name="textarea" cols="40" rows="4" wrap="VIRTUAL">
YOUR CODE GOES HERE
< /textarea>

The resulting code box looks like this:


The code box can be height and width adjusted by modifying the cols="100" and rows="50" values to your liking.

The final result is a tidy little place to paste code, which I greatly prefer to pasting the code directly to the post or boxing the code in with bounding lines.  This should come in very handy for future posts, and should increase the readability of any code I may copy to blogger as well.

No comments:

Post a Comment

Work in Progress - Disputed Areas Map

I started this project as a fun change of pace from my normal GIS day-to-day, and as a way of brushing up on my cartography skills. For me,...