Code formatting for BlogEngine.Net with tinyMCE

by Jacobus Meintjes June 14, 2009 11:29

 

This is my first try at the code formatting. Thanks to Manoli.net for the formatting code. I have added this to my BlogSite.


I will zip this and add it to this post later.

 


1:
using System;
   2:  using System.IO;
   3:  using System.Reflection;
   4:  using System.Text;
   5:  using System.Text.RegularExpressions;
   6:   
   7:  public partial class admin_CodeStyle : System.Web.UI.Page
   8:  {
   9:      protected void Page_Load(object sender, EventArgs e)
  10:      {
  11:   
  12:      }
  13:   
  14:      private string FormatSource()
  15:      {
  16:          CSharpFormat format = new CSharpFormat();
  17:          format.LineNumbers = true;
  18:          format.TabSpaces = 4;
  19:          format.Alternate = false;
  20:          return format.FormatCode(txtCode.Text);
  21:      }
  22:   

 

Tags:

tinyMCE

Comments are closed

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen | Modified by Mooglegiant

About Me

Jacobus Meintjes
 
C# developer working with ASP.Net and/or Windows Forms.
Email Me

Cumulus

This will be shown to users with no Flash or Javascript.

Widget Twitter not found.

Root element is missing.X