CS Tidbits #11: Add Code Highlighting Capabilities

Today’s tidbit is aimed towards site admins who run websites geared towards programmers. Programmers are a finicky bunch, and most of us would rather look at code that is color coded similar to what we would see in Visual Studio as it just makes for…well, better readability. About a month ago, a new wrapper was released for the FreeTextBox editor that ships with Community Server that provides this functionality and supports color coding for the following languages:

  • C#
  • VB.Net
  • CSS
  • HTML
  • Asp.Net
  • Xml
  • Sql
  • JavaScript (use the C# option)

This is the same wrapper that is used over on forums.asp.net and is quite useful. Installation is painless (simply copy a couple of files to your website) and requires no configuration file entries, unless you want to make this editor the default for your site in which case you need to do the following:

  • To specify this editor as your site default editor, set the textEditorType in the communityserver.config file to: textEditorType = "Telligent.FreeTextBoxWithCodeEditor.FTB, Telligent.FreeTextBoxWithCodeEditor"

No comments yet