This seems trivial but I find it difficult to implement. Let's say the current format is Heading 1. As I hit the Enter key, I want this format to be ratained on the next line. I've been experimenting with the PrehandleEvent method and respond to a KeyPress or KeyDown events for the Enter key (KeyCode==13), but finds no luck.

It's easy to apply a block format with the execCommand("FormatBlock", ...) command, but retaining the current format as the user hits the Enter key is a little bit tricky (at least for me).

May I add that the functionality I'm trying to implement is one that is implemented in Macromedia's Dreamweaver, and lacking in Microsoft FrontPage.

Macromedia's programmers are geniuses -- the functionality of their products is being copied by Microsoft programmers (case in point -- look at the mouse-cell-selection behavior in Visual Studio 2005).