Code Tag Plugin for Windows Live Writer

by Alex Meyer-Gleaves 13 January 2009 - 9:21 PM

I made a simple Windows Live Writer plugin that allows you to easily surround text with the <code> HTML phrase tag. Writing a plugin for WLW is fairly straightforward and everything you need to know can be found in the Windows Live Writer SDK documentation on MSDN. The default browser rendering of text inside a <code> tag is to display it using a fixed-width font. You can of course alter its appearance using CSS to make it a little more interesting.

If no text is selected in the editor and the plugin is activated, a small dialog is presented into which you can enter the text that is to be placed inside the tag. You can also select text in the editor and have it immediately placed inside the tag when the plugin is activated. Trailing whitespace in the selected text will not be included inside the tag. Any trailing whitespace inside the tag would also be fixed-width, causing the spacing before and after the text inside the tag to appear uneven.

To install the plugin simply drop the AlexMG.CodeTagPlugin.dll file into the C:\Program Files\Windows Live\Writer\Plugins folder. When building from source code the plugin will be copied to the WLW plugin folder during the post-build event.

<code> Tag Plugin (3.67 kb)

<code> Tag Plugin - Source (5.45 kb)

Tags: ,

Categories: Garage Sale Code

Comments are closed

About the author

Alex Meyer-Gleaves I'm a software developer living in Australia (that island like continent in the southern hemisphere). I love Microsoft .NET and C#. I hate early mornings, slow drivers and Lotus Notes.

Google Reader Clips

SpringWidgets
RSS Reader
This widget is the staple of our platform. Read all your feeds right here with thisone widget - Supported feeds are OPML, RSS, RDF, ATOM. Watch your favorite Podcastin the embedded Video Player on the Desktop or publish your own video playlist toyour site for others to view!

Recent Comments

Comment RSS

Links

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2008