I've been inserting a few <hr /> tags into posts recently. In order to do this, I've had to switch to HTML view and move the cursor to the right spot, and type the tag. Then switch back and reset focus. Grr!
Well, easily enough, I've created a Windows Live Writer Plug-in to do this. Rick Strahl had the winning post that guided me through it.
1: using WindowsLive.Writer.Api;
2: using System.Windows.Forms;
3:
4: namespace JeffHandley.WindowsLive.Writer.Plugins
5: {
6: [WriterPlugin("13CB96BD-B1FA-494f-9D29-8DA437F46974"
7: , "Horizontal Rule"
8: , ImagePath="Icons.InsertHRTag.png"
9: , PublisherUrl="http://JeffHandley.com"
10: , Description="Insert an <hr /> tag")]
11: [InsertableContentSource("Horizontal Rule")]
12: public class InsertHRTag : ContentSource
13: {
14: public InsertHRTag() { }
15:
16: public override DialogResult CreateContent(IWin32Window dialogOwner, ref string content)
17: {
18: content = "<hr />";
19: return DialogResult.OK;
20: }
21: }
22: }