As you put it "html fragments" not full html pages.

It's just a question of whether you prefer writing in the wizzy editor (the default) or the markdown editor. Since you're coming at it from a script, not sure exactly how it would work. I'm away from home right now and can't look it up. There are docs for the calls now, you could check that out.