Formatted Clipboard Paste for Windows Live Writer


Noah Coad authored a great add in for Windows Live Writer, my favorite blogging tool.  This add in lets you paste in formatted rich content from the clipboard.  Great job Noah!

http://blogs.msdn.com/noahc/archive/2006/11/08/insert-formatted-clipboard-plugin-for-window-live-writer.aspx

 

As a test, see the below! 

 

Description
WLW doesn't support pasting rich content from the clipboard.  Try copying something from IE or an Office product (Word, Excel, etc) and paste it into WLW, just plain text is all you get.  With this plugin, you can paste clipboard contents and keep most of that nice formatting.

How it Works
This plugin uses the IE DHTML Editing Control behind the scenes to parse the clipboard contents into a valid block of HTML.  MS Word is known for it's messy HTML, but this does a fine job of cleaning it up.  It uses the technique I discussed in Copy Paste HTML From MS Word: IE's DHTML Editing Control (in a .NET WinApp).  This is wrapped into a plugin using the WLW SDK.

Using the Plugin
You can use this with any app that puts HTML onto the clipboard.  This includes IE, FireFox, Word, Excel, etc.  By using this control, I can get nicely formatted C# code into my posts (see Tip: Beautifully Formatted .NET C# Code in Blog Post).  There is another Insert Code plugin for WLW, but I don't care for it.  WLW has a hard limit of 32k of HTML code, which you can rapidly hit by inserting too much formatted HTML, so be aware of this.

Skip to main content