Posting code samples on web pages sucks. Much of the nice formatting that makes code readable gets completely lost when you toss it into HTML. What you end up with looks like modem line noise.
To combat this, I wanted to create a Sitefinity control that would easily allow me to post nicely formatted code samples to my web pages. This ended up becoming a fairly complex project.
To see full information & download details about this control, click here.
Sorry I have to direct you to a new page. Sitefinity Blogs do not allow controls. This is beginning to limit what I can do with these blog entries. This is a subject that has been discussed on the Sitefinity forums.
UPDATE: It turns out RadEditor has a very handy "Format Code Block" feature that does this very same thing. So basically, I just wasted a fair amount of time because I didn't RTFM! :) To make use of this you need to add the following bit of code:
| <tool name="FormatCodeBlock" enabled="true"/> |
Into the
~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml
If you want to witness my complete disgrace on this, then you can look at the following forums' thread:
http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-bamacd.aspx
My thanks to Ben & Sean for hitting me with a clue-by-four. I am still going to leave my "Format Code" control available for download however. At the very least, it does demonstrate a working Control Designer.