Changeable SyntaxHighlighter Theme

Topics: Controls, Themes
Jul 30, 2009 at 10:53 PM

Hello, i've make an additional code from David Pokluda BlogEngine SyntaxHighlighter Extension to be able to change the SyntaxHighlighter Theme

Basically, to do this we need a setting for the extension, using ExtensionSettings class would be the answer.

 

// Code by Rudy Setyo Purnomo
// http://rudysetyo.it

ExtensionSettings settings = new ExtensionSettings(“SyntaxHighlighter”);

settings.AddParameter(
    "shTheme", 
    "shTheme", 
    50, 
    true, 
    true, 
    ParameterType.RadioGroup);
settings.AddValue(
    "shTheme", 
    new string[] 
        { 
            "shThemeDefault",
            "shThemeDjango", 
            "shThemeEmacs", 
            "shThemeFadeToGrey",
            "shThemeMidnight",
            "shThemeRDark"
        }, 
    "shThemeDefault");

settings.Help = "SyntaxHighlighter Theme";

ExtensionManager.ImportSettings(settings);

For more information and screenshot, please direct to my blog.