There is inconsistency for creating new lines when users press enter in various browsers for elements with the contenteditable attribute set to true.
I'm not jumping on mailing lists though I think the issue should be easily resolved: web designers. Frankly web designers either get
to use or have to deal
with standards. The problem I've had while creating a rich text editor is that Firefox consistently refuses to give the keyboard caret focus to paragraph elements enforcing a sort of anti-paragraph element policy. I've filed a bug
What browsers should
do is honor the web designer's goal, paragraphs or not. If a paragraph exists inside of a contenteditable element then new lines should create new paragraphs. However if there are no paragraph elements present to begin with inside of an element with the contenteditable attribute set to true then new lines should be generated using the breakline element (<br />). This would allow everyone who disagrees to agree because at the end of the day you can choose whichever manner you wish the (X)HTML to be generated.
I should add some clarifications. White space should be completely ignored in the presence of a paragraph element unless a pre element exists (in it's own applicable way). So in example indented paragraphs would gain the keyboard caret focus instead of having the caret be given focus before
the first paragraph; this is currently the bugged behavior in Firefox that I submitted the bug report about.
In the presence of pre elements the behavior should be subjective to if the caret is focused inside of the pre element or not; this in effect should allow the web designer to have text in both
paragraph elements and directly inside of the element (e.g. divisible element) with the contenteditable attribute. In regards to white space at the beginning of the contenteditable element whichever is encountered first should determine what happens when the user presses enter; if it's a pre element breakline elements should be generated while if it's a paragraph new paragraph elements should be generated. If the user presses the down arrow and moves the keyboard caret in to a pre element then
pressing enter should generate breakline elements instead of paragraph elements. In all other cases white space should be completely
ignored if the keyboard caret is not focused inside of a pre element.