Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Hey bloggers out there! I've created Wordpress blog that I am hosting myself, and I'm having the hardest time figuring out the best way to add C# snippets to my blog. What do you all use?

I'm currently using the "SyntaxHighlighter Evolved" plugin, and it works great for the most part - the only problem is that switching back to the Visual Editor removes all of the whitsepace padding. I've tried wrapping the [sourcecode] tags in <pre>'s, but then the formatter doesn't work correctly.

Any help would be much appreciated. I've spent about 10 hours trying to come up with a robust solution, and no luck. Cheers!

like image 610
Charles Avatar asked Apr 12 '09 21:04

Charles


People also ask

Is it good to format C drive?

Formatting C drive can wipe virus or malware safely and safeguard computer. System has crashed: Operating system on your computer cannot boot, and formatting C drive and reinstalling system might be ultimate solution.

How can I format C drive without losing OS?

☛ Unfortunately you cannot directly Format C drive without deleting Windows, but there's a Reset this PC feature could wipe everything off the hard drive and then reinstall Windows. Thus all the problems will be solved at once.


1 Answers

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).

like image 200
Yaakov Ellis Avatar answered Oct 08 '22 14:10

Yaakov Ellis