Fantastic! I’ve been grappling with WordPress’ TinyMCE WYSIWYG editor for two months now, and have grown to dread having to present code within this tool. I even took to performing the syntax highlighting myself, and that meant manually colouring text according to how it appeared in my IDE.

So, I decided to call in the help of a syntax highlighter, and settled upon across Alex Gorbatchev’s SyntaxHighlighter.

So here is the first bit of code (in C#) that I’ve tested out. It’s fairly trivial, and does nothing meaningful. It doesn’t, of course, recognise any of the built-in C# class names, but that would be expecting a hell of a lot!

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        textBox1.Focus();
        MyKeyPress mkp = new MyKeyPress();
        mkp.KeyPress();
    }
 }

Of course, if you are reading this through a feed, then you’ll not see any of this. So, Just follow the link!

If it’s not too onerous, I may revisit some of my other posts.

, ,