AylarSolutions.Highlight 1.0 - Released

I have finally finished it! The first public release of AylarSolutions.Highlight (formerly known as CodeHighlight) is actually available. Go here to get it:

http://aspalliance.com/aylar/highlight/aylarsolutions.highlight-1.0.zip

Currently there is one known bug and that is with keywords that contains a space, i.e. VB.net's 'End Class', which by definition isn't a word, but rather a collection of words. I have solved this by adding an 'End' keyword to the VB.NET language definition.

Now, you are perhaps asking yourself, what is this AylarSolutions.Highlight thing Thomas is talking about, and what can it do for me?
Well, AylarSolutions.Highlight is a .NET component written in C#, that allows you to very easily get HTML marked-up code. All you need to do is to pass your code source through Highlighter.PerformCodeHighlight method and au voila, it spits out a marked-up version.

Currently the language definition file (Languages.xml), contains definitions for C#, VB.NET, J# and T-SQL. You can easily extend this small definition collection, either by altering the XML file by hand, or by taking advantage of the Configurator class that is shipped with the component (Note: the Configurator class is currently not working 100% due to some changes to the structure of the configuration file. This will be fixed in a couple of days).

For the future, I have planned to add support to generate XML and RTF marked-up code, as well as release a web and windows configuration application to allow you to more easily configure the component's configuration file.

Please give me some feedback on the control, either by adding comments to this post or emailing me at  aylar AT aspalliance DOT com.

Update: I had forgotten to zip down the Languages.xml file, this is now fixed. This file should either be placed in the root of the application where you are running the component from, or specify its location using a web.config file or the ConfigurationFile property.

Published Sunday, August 17, 2003 2:12 AM by Aylar

Comments

# re: AylarSolutions.Highlight 1.0 - Released

Saturday, August 16, 2003 1:05 PM by Justin Lovell
Hey fellow ASPA writer... just did my own control to highlight my syntax and I also managed to do the mark up languages myself. If you want the source for the markup languages, contact me at jlovell@aspalliance.com

# re: AylarSolutions.Highlight 1.0 - Released

Saturday, August 16, 2003 1:14 PM by Roy Osherove
Cool ! How about adding some sample code that uses your componenet?

# re: AylarSolutions.Highlight 1.0 - Released

Saturday, August 16, 2003 1:38 PM by Thomas Johansen
Working sample: http://aspalliance.com/aylar/highlight/tester.aspx

The source to the sample is available at: http://aspalliance.com/aylar/highlight/tester.aspx.txt (Note, do a 'View Source' on this, as most browsers tries to parse it as XML)

# re: AylarSolutions.Highlight 1.0 - Released

Sunday, August 17, 2003 1:41 PM by Hammer12
Just tried it at aspalliance and keep getting "an error has occured"

# re: AylarSolutions.Highlight 1.0 - Released

Sunday, August 17, 2003 1:47 PM by Thomas Johansen
Sorry about that, I had forgotten to turn of request validation :/

# re: AylarSolutions.Highlight 1.0 - Released

Monday, August 18, 2003 4:36 PM by Rob Chartier
I would love to see a DNN Desktop Module i can just plug into my site and have it work. (Including saving/loading past paste codes, relating them to users, etc...)

# nGallery UI!

Tuesday, August 19, 2003 10:22 AM by TrackBack

# re: AylarSolutions.Highlight 1.0 - Released

Friday, January 09, 2004 2:51 AM by LittleBoy
But it's only For Asp.Net

can this use in WinForm Project

Such as

AylarSolutions.Highlight.Highlighter h = new AylarSolutions.Highlight.Highlighter();

RichTextBox.Text=h.PerformCodeHighlight(0, sourceTextBox.Text, languageDropDown.SelectedValue);

# re: AylarSolutions.Highlight 1.0 - Released

Thursday, March 18, 2004 6:16 AM by nice90
Hi,Thomas. I could not find the "Languages.xml" file in unzip files. But I find the "Definitions.xml" file, it can replace the "Languages.xml" file.

Leave a Comment

(required) 
(required) 
(optional)
(required)