Staying in <P> mode after <H1>

Allan Pratt <[email protected]>
Newsgroups gmane.comp.mozilla.devel.editor
Message-ID <[email protected]>
Like everybody else in the universe, I am using the textarea
designMode feature of FireFox to get a WYSIWYG editor for a wiki.

When my users type in the rich-text editor, I would like it to revert
to paragraph mode when they hit Enter after typing headings, and when
they hit Enter twice to exit from lists. But it does not: it reverts
to "nothing" mode, where the text is outside of all HTML blocks. That
is, text they type is not in a <P>...</P> section or any other HTML
construct.

I read the typing rules behavior document at
http://www.mozilla.org/editor/rules.html but the observed behavior of
the embedded widget does not match those rules - especially the rules
that seem to say you can hit Enter once to get <br>, then hit it again
to get <p>. That would be almost as good as staying in <p> mode in the
first place.

Is there any hope? Some JavaScript I can use to configure the editor,
or some mechanism to "trick" the editor into staying in paragraph
mode? Thanks.

-- Allan Pratt, [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.