You Can’t Do Everything in Windows Live Writer
A short while ago I wanted to convert my ajax tagger in to a Windows Live Writer Plugin.
After some silly mistakes creating sample plugins I started to learn how the API works and some the short falls of the current API.
The main thing I noticed was that you cannot access the text of the post inside your plugin. You cannot access the selected text either.
I pinged off an email to the Window Live Writer Forum
I am in the process of playing with the SmartContentSource class for creating a plugin. But I am having some problems.
I am debugging my plugin, to see the state of certain objects such as the SmartContent Objects. My Plugin creates a side bar and manipulates the SmartContent Object, all fine and well.
The problem that I am having is that I can determine what text is in the blog post at the moment. The SmartContent object doesn’t have anything, and the object represented by the ISmartContentEditorSite interface doesn’t have the whole text or selected text.
Does anybody know how to get at this text, because as I see it, if plugins can’t see the blog post then there is only a small finite amount of plugins that we as developers can create.
And this was the response that I got from Joe Cheng at Microsoft.
Right now, the plugin model is just about inserting objects. Can you share what your idea for a plugin is?
It’s not as simple as saying “whole text” or “selected text”, blog posts are composed of a pretty rich set of objects from MSHTML and from our own framework. If we can understand your specific scenario it would help us figure out the right way to design these interfaces.
Which is straight to the point. I have let them know of the ideas of the things that I wanted to do.
I would also suggest that if you have any other ideas for plugin for Windows Live Writer that you cannot create in the current implementation of the API, then let them know as quick as you can so that we can get a big bit of ground support so that are requests will be taken notice of.
I belive we need access to the text of the plugin because without it we will be very limited to the number and types of plugins that we can create.
For instance we would not be able to mark up posts with microformats as easily. We will not be able to respond to the content and meaning of the post, so for instance we would not be able to create an automated tagger that simply looks at the content of a post and works out the topics (much like my Ajax Tagger http://ajaxtag.kinlan.co.uk/).
Paul Kinlan is the author of the popular C#, .Net Framework blog. Paul is an Analyst Developer working in Southport, England. Paul has several years experience developing and designing massively scalable enterprise systems on UNIX and Windows based architectures.