Thursday, February 05, 2009

Windows Live Writer and Blogger formatting

I think I have it worked out.

There is a Blogger setting that stuffs up edits done with Live Writer. Settings > Formatting > Convert line breaks needs to be set to No. Then you don’t seem to get the double line spacing.

The trick with WLW seems to be to let it put in paragraph tags and to never ever edit the post in blogger. Or at least to never switch between the blogger html editor and the compose editor – that really screws things up.

In the end, WLW is still in beta so there are issues. Undo does not do what I would expect. You can’t just type away and press enter to get a new paragraph… Seems like for the first paragraph you have to hit enter then the down arrow otherwise the insertion point is above the first paragraph container. Odd.

I will just resign myself to being careful with the editor, then being prepared to fix the mark-up by hand.

The CodeSnippet pug-in works best if you do not embed the styles but copy them to your template to be re-used. That is how I wanted to do it anyway. Here is a little code snippet:

// Check for required fields
foreach(var f in from f in TheForm.Fields
                 where f.RequiredForEmail
                 select f) {
    prop = requestType.GetProperty(f.Name);
    if(prop == null || prop.GetValue(data, null).IsBlank()) {
        Ok = false;
        break;
    }
}

No comments:

Post a Comment