When composing an HTML email message, I prefer the Enter key to not skip a line (ie. I don't want "double spacing"). This is the way WYSIWYG word editors behave, and most local email apps as well as Gmail, Yahoo Mail, etc, also behave this way.

Can the Zimbra HTML editor be configured to behave this way too? In other words, can the Enter key generate <div> tags instead of <p> tags?

The following explanation (although about an unrelated HTML editor) has more details:

http://blog.fastmail.fm/2007/10/03/h...-fckeditor-25/
Quote Originally Posted by FM
One of the features I really wanted to use was the new EnterMode option which allows you to control if the Enter key generates either a <br>, a <p> or a <div> tag. This turns out to be surprisingly important because of the way HTML works versus the way people expect WYSIWYG style editors to work.

The problem resolves around two conflicting observations


  1. When people hit Enter, they want the cursor to drop directly to the next line and not leave any vertical gap
  2. When people hit Enter, they expect a paragraph of text to created and treated as a "block" of text for block level formatting items (eg indent, right-to-left display, etc)

The problem is that in HTML, to create a new “block” of text, you use <p> markers around the text. Unfortunately by default browsers includes some vertical spacing between blocks of paragraph text. So if you set EnterMode=p, then when you hit Enter, it does create a new <p> block, but also the cursor moves down what appears to be around 1.5 lines, rather than directly to the next line. Now you can explicitly set the spacing on paragraphs so that it bunches paragraphs directly underneath each other with no gap, but you need to apply that to the whole document, which means that if you reply to existing text that contains <p> tags, those will all be bunched next to each other as well, even if that’s not how the original author intended it and can make it hard to separate out paragraphs. Basically there’s a disconnect between the semantic nature of the HTML and the way it’s displayed.

Going the other way, if you use <br> markers, these don’t create new “blocks” of text, they merely designate points in the big block of text where to insert a line-break. While this might sound fine, it creates problems when you then try and perform actions on blocks of text (eg center, or turn into a list, or change to right-to-left text display, etc). Despite these issues, the fact that inserting a <br> moves the cursor immediately to the next line which is what most people expect, is the reason most online HTML editors use this approach.

The final approach is to use <div> markers. In fact, div markers are an excellent compromise. They do create new HTML blocks making formatting easier, but by default don’t include any extra vertical spacing, so they create the “cursor drops down only one line” effect. Interestingly, the HTML editor in Outlook Express has always used <div> markers when using the Enter key, and in most cases it creates exactly the effect people want.