To use a template for preview in JBlogEditor, go to File | Blog Properties and check Use Template. By default JBlogEditor comes with one basic template. However its very easy to create custom templates to make the preview look like your blog.
Velocity template engine is used to generate the HTML for preview. If you not familier with Velocity, think of it as token replacement (Velociy is much more powerful, but for now JBlogEditor uses it like a token replacement engine). Each blog type supports certain set of tokens. A template is composed of normal HTML and these tokens. Just before preview is done, these tokens are replaced with their actual value and the generated html shown in the preview.
The template is made available is JBlogEditor by creating the template file in the C:\Documents and Settings\<username>\.jblogeditor\<blog name> directory. So in my case it is C:\Documents and Settings\lokeshshah\.jblogeditor\lokeshshah-wpBlog. (For those familiar with Eclipse, .jblogeditor is the default workspace used by JBlogEditor). The template file is must be named template.vm.
Here’s a simple template file:
margin:20px auto 0px;
border-bottom:1px dotted #ccc;
$entryTitle: by $user
There are some special token that I have used in the html above: $title, $entryTitle, $entryDate, $entryBody, $user. These tokens are replaced by their actual values taken from the entry being previewed.
That’s all there is to creating new templates. Just relaunch JBlogEditor and start enjoying the new preview functionality.