Using SnagIt Screen Capture Plug-In for Windows Live Writer

Screen captures are important when blogging and having an easy way to capture images from the screen and embedding them into a blog entry is a key feature. SnagIt from Techsmith Corporation is a popular and very usable utility for taking such snapshots of screens.

When using Windows Live Writer blogging client software there are different plug-ins which integrates SnagIt with Live Writer. I first installed various versions from the “official” Plug-in website, but they all did not work for me and the version of SnagIt I have installed on my machine (SnagIt 8.0.1). After some Google searches I have found this plug-in which works for me!

Posting Source Code with Microsoft Live Writer and WordPress

Today I searched for a solution to post source code using Microsoft Live Writer to my blog hosted on WordPress.com.

WordPress itself has an integrated Syntax Highlighter supporting most popular languages. Details of how to use it can be found here.

But how do you use the WordPress Syntax Highlighter when using Microsoft’s Live Writer (which I really find a good tool for offline writing) for posting? There are syntax highlighting Plug-ins available for Live Writer, but they are all not compatible with the WordPress way of syntax highlighting. After doing some Google searches, I’ve found a special Live Writer Plug-in supporting WordPress written by Rich Hewlett. It can be downloaded here.

After that inserting nicely formatted source code is just a matter of a few mouse clicks:

 public static BusinessEvent buildEvent(String input)
        throws Exception
    {
        QName eventName =
            new QName ("http://schemas.oracle.com/events/edl/HelloWorldEvents",
                       "InitiateHelloWorldEvent");
        BusinessEventBuilder beb = BusinessEventBuilder.newInstance();
            // set the event name (that matches the QName of the EDL)
            beb.setEventName(eventName);
            // payload element as dom
            beb.setBody(createElementFromInput(input));
            UUID uuid = UUID.randomUUID();
            beb.setProperty(BusinessEvent.EVENT_ID, uuid);
            // the conversation id can help to find the composite instance later via conv id.
            beb.setProperty(BusinessEvent.PROPERTY_CONVERSATION_ID, uuid);
        return beb.createEvent();
    }

Thanks Rich for developing this really usable Live Writer Plug-in for WordPress!