Posts tagged: code

Adding Code Snippets to Software@UNH Posts

For all you software@UNH Contributors I have added the ability to add formatted code snippets to your posts, a la:

<?php
Echo "Hello, World!";
?>

To make this work you should probably use the HTML editor (I’ve had some issues with making this work with the Visual editor) and add the appropriate open and close elements around your code.  For example:

   [php]  ... your code... [/php]
   [css]  ... your styles... [/css]

This uses the SyntaxHighlighter plugin. Check out this link for a list of supported languages.

Panorama theme by Themocracy