This is a C# example formatted using the SyntaxHighlighter plugin:
http://psykoptic.com/demo/syntaxhighlighter2/default.aspx
/// <summary>
/// This is an example of a C# function that returns a string based on a boolean
/// It will optionally return HTML with appropriate colors
/// </summary>
/// <param name="boolString"></param>
/// <returns>'yes' or 'no' as string</returns>
/// <remarks></remarks>
private string GetYesNo(bool boolString)
{
if (boolString)
{
return = "<span style=\"color:#009300\">yes</span>";
}
else
{
return = "<span style=\"color:#cc3300\">no</span>";
}
return output;
}
This is an HTML example formatted using the SyntaxHighlighter plugin:
<html>
<head>
<title>Example Title</title>
</head>
<body>
<h1>I'm header text</h1>
<p>I'm body text <a href="default.aspx">with a link</a>
</body>
</html>
Both code blocks are wrapped in <pre> tags and look the same in FCKEditor, but once they are displayed on the website, the SyntaxHighter formats the areas correcly. Try it. Hit the button ------------->
<html>
<head>
<title>Example Title</title>
</head>
<body>
<h1>I'm header text</h1>
<p>I'm body text <a href="default.aspx">with a link</a>
</body>
</html>