Click to See Complete Forum and Search --> : Colorized forum posts


Digory
12-03-2002, 02:00 PM
I've created a page that will allow you to syntax highlight posts in the following languages:

- Javascript
- VB.NET
- C#
- TSql
- VBScript

You can view the page here:

http://www.markitup.com/Forum/WebDeveloper.asp

Samples:
-----------


Javascript
var timeoutCookie;
var menuPopupCookie;

function menuOver(id)
{
var menuX = (event.clientX - (event.x + 2)) + document.body.scrollLeft;
var menuY = (event.clientY - event.y) + document.body.scrollTop + 16;

event.srcElement.onmouseleave = menuPopCancel;
menuPopupCookie = window.setTimeout('menuPop(\'' + id + '\', ' + menuX + ', ' + menuY + ');', 1000);
}


VB.NET
' Allow users access to the title
Property Title() As Label
Get
Return TitleLabel
End Get
Set(ByVal Value As Label)
TitleLabel = Value
End Set
End Property



C#
using System;

namespace TestAttributes
{
/// <summary>
/// This class represents a user to the application.
/// </summary>
/// <remarks>
/// These comments are hidden from the stupid users
/// </remarks>
public class User
{
private string firstname ;
private string surname ;




TSql
SELECT @strIdentityColumnName = Name
FROM dbo.SysColumns SC
WHERE OBJECT_NAME (ID) = @vstrTableName
AND COLUMNPROPERTY (OBJECT_ID (@vstrTableName), Name, 'IsIdentity') = 1

IF COLUMNPROPERTY(OBJECT_ID(@vstrTableName), @strIdentityColumnName,'IsIdentity') = 1
BEGIN
SELECT @rintIdentityExist = 'Y'
END




Mark-up WebDeveloper posts here
http://www.markitup.com/Forum/WebDeveloper.asp

Stefan
12-04-2002, 08:24 AM
Originally posted by Digory
[B]I've created a page that will allow you to syntax highlight posts in the following languages:

- Javascript
- VB.NET
- C#
- TSql
- VBScript


Great idea :)

But why no syntax highlighting for HTML and CSS?
I'm sure that's used more then VB.NET, C#, TSql & VBSript together ;)

spufi
12-04-2002, 12:04 PM
Hmm, a definate Microsoft vibe to that list. How about adding Java, PHP, and Pearl?

Digory
12-05-2002, 04:00 AM
I'm currently working on some algorithms for marking-up mark-up such as Xml and Html, you can play around with the dinky WIP toy that I've built if you like:

MarkUp converter - Work In Progress (http://www.markitup.com/demoArticle/MarkUpDemo.asp)

Make sure you try it with "Attribute coloring" On. It's pretty funky :)

As for adding support for other languages; it wouldn't be too difficult. The component (ActiveX .dll) reads it's language definitions from a configuration file. When you buy the component <insert shameless plug here /> you can easily create your own language definitions. The component itself comes with pre-configured definitions for the languages that I've previously mentioned, and soon C++.

When you buy the component you also get a web application and a windows application to assist with language definition creation. Here's what the web application looks like:

MarkItUp Configurator Application (http://www.markitup.com/client/ConfigureItUp.asp)

You cannot modify the Static definitions, but you can clone them to create new Dynamic definitions.

Please e-mail me if you are interested in receiving more information about this product.