code elements so that their content (the code itself) is highlighted nicely.
Specially decorated? Yep, it looks like this in the HTML:
<div class="jmbcodeblock"> <pre><code class="language-foo"> _the code to be shown highlighted_ </code></pre> </div>
where ‘foo’ is the language of the code to be highlighted. The outer named
div is strictly not part of Prism, but is there to help with styling the result for my blog’s theme.
The big problem is that just pasting code into the Windows Live Writer editor will produce a bunch of paragraphs, so you have to switch over to the Source window, paste the code, then add the pre- and post-markup as shown, and then switch back to the normal editor. Not an insurmountable manual process by any means, but you do have to remember what the language values are (for example, to paste HTML code like that above, the language is ‘markup’).
The answer then is to write a small plug-in that does all that automatically without worry. Which is what I did this afternoon, and posted it as a repository to GitHub (WLWCodePaster). Because ostensibly I’m supposed to be switching to Open Live Writer, I posted that version to GitHub too (OLWCodePaster).