Windows Live Writer Plugin: Convert RGB color to Hex
Since a while I’ve been using the Windows Live Writer. Though it’s a nice and handy tool that works way better than any web interface, it misses some functionality like pasting the code from Visual Studio, Search and Replace, etc.
Some time ago I have found a nice plugin to paste the Visual Studio keeping the formatting, yet there is one downside to it. This blog doesn’t support the colors definition using the rgb syntax, like: style=“color: rgb(0,0,255)“. Community Server renders the colors properly in it’s edit mode (preview mode of Tiny MCE) but the text is all black after publishing. After doing the replace by hand a few time, I have decided to write my own Live Writer Plugin to do it for me.
All I need to do now is to Select All and then click on the plugin to do the job for me. Writing the Live Writer plugins isn’t very difficult and you can do it easily within a few minutes. I suppose the mechanism is quite powerful yet the most simple things like replacing can be done by writing a few lines of code.
You can download the plugin from the CodePlex site. I haven’t wrapped the plugin in any fancy installer. Simply unzip it and put it in the Plugin folder of the Live Writer and it will automatically appear on your Insert bar.