How can I make the browser insert <p> tags instead of <br> tags when I press enter in a designMode IFrame? I get inconsistent behavior across Firefox, Chrome and IE and was wondering if there was some way to normalize this.
How can I make the browser insert <p> tags instead of <br> tags when
Share
It seems you can’t. Behaviour is not standardized and control for this is rudimentary at best
This is an interesting thread from May thie year on the matter: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-May/031577.html . It’s discussing contenteditable rather than designMode but they’re effectively very similar.
An email on the thread ( http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-May/031604.html ) from Simon Pieters (zcorpan) of Opera says:
Further in the thread there’s also this email http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-May/031685.html by Markus Ernst including this comment:
There’s lots more on the thread about what people at the various browser makers think ought to happen, comments on some very strange existing behaviours, and general discussion about the problem involved in implementing it at all.
The currently very alpha spec for all this is at http://aryeh.name/spec/editing/editing.html