What's best way to format C# in WordPress? What's best way to format C# in WordPress? wordpress wordpress

What's best way to format C# in WordPress?


See the blog post that I wrote on this exact question, which explains how to use SyntaxHighlighter and fix TinyMCE so that it doesn't mess up your white space or tags (you can either customize one of the tinymce files in Wordpress, or use a plugin to do it for you).


Use the WP-Syntax plugin. To use it, you wrap the code with a pre tag with a language attribute. Consolidates the effort.


If Client-Side (JavaScript) Syntax Highlighting is also an option, I can recommend google-code-prettify, which works quite well. Only a little Code escaping is needed to make it zero-friction for me as an author, as I detailed in a posting.