Saturday, August 26, 2006

My First Windows Live Writer Plugin (Text Templates)

I like to try to be consistent in my posts. I want to not have to remember "Do I use 'Related Past Post XRef:' or 'Related Past Posts:' or 'Past Post XRef:' or ..." (sigh... all of which I think I've used).

One of the things I like about my old blog post client (Post2Blog) was that it had an easy to use template/snippet insert feature. Like you'd expect from this kind of feature, you define a number of snippets and then when writing a post you can quickly select and insert them.

Well I miss that feature in WLW. So my Saturday project was to write my own text template plugin using the WLW SDK.

Once I got the stupid out of my brain (wow... there's so much room in there now ;) it only really took a few minutes.

So now I have a very simple and hard coded text template WLW plugin. Yeah!

Before I post it anywhere (assuming I'm able to with my work IP contract... sigh) I want to tweak it a good bit. Add an Options dialog to allow user driven text templates to be added and managed, etc.

I do wish (or maybe I've just not found it yet) I could query and get more info from WLW. WLW lists Recent Posts, I wish I could get at that list in my plugin. I also wish I could get at the UI (to add a drop down list of my text templates). I also wish the SDK sample included a VB project (yes, I know, I know... I can read C# and can do a pretty good job of real time translation from C# into VB, but that takes brain cycles that I'd rather use on other things... yada, yada, yada)

In any case. the take away from this post is that it's pretty easy to extend WLW.
That you shouldn't let the C# examples stop you if you're a VB'er.
That it's okay to start simple with your plugin.
That there's no reason to wait on building a plugin. If you miss a feature in WLW, write it...
That the ability to easily create and add plugins will make WLW.

Some of the resources that helped me today:
Writer DevZone - Writer Plugins Gallery
Windows Live Writer SDK
Keyvan Nayyeri - Write a Windows Live Writer plugin using C#

Related Past Post XRef:
Guide to Writing a Windows Live Writer Plugin in C#

2 comments:

Anonymous said...

Hi, if you dont mind i have put your links in my blog. If you do let me now.
Thank you

Greg said...

Thank you for the heads up and no, I don't mind at all. As a matter of fact, thank you for the link.

Subscribed to your feed now too... ;)