Monthly Archive

Categories

Colour highlighted code in posts

I’ve been having a bit of difficulty getting code highlighted code into my posts recently. I use Live Writer to publish the posts and I was using an ISEadd-in published by Lee Holmes to paste the code. This has stopped working recently. Nor sure why.

I remembered that the PowerShellPack of modules

http://archive.msdn.microsoft.com/PowerShellPack

included some ISE extensions.

I loaded the module through the ISE profile and on the Add-Ons tab there is a ISEpack entry. Under the Edit menu I tried Copy-Colored but it didn’t work properly with Live Writer. However, Copy-ColoredAsHTML does work.  It just means I have to paste the code into the source view of the post and then revert to the Edit view.

Not really that more fiddly than using the paste special functionality.

I suspect that the difficulties all lie with Live Writer but at least I can paste colour (notice I spell it correctly Smile ) highlighted code.

Leave a Reply