Re: [w3c/editing] Change default paragraph separator from <p> to <div> (#146)

It also affects what happens when the user presses "Enter" (which is equivalent to calling execCommand("insertparagraph")).  Do any editors use this, or do they all override it?  I assume they override it, and would be very interested to know if they don't (because it means the code might be significant).

Either way, as @johanneswilm says, this is just reflecting what browsers have already done.  If you do want to use built-in browser handling for the user hitting Enter, and want it to produce <p>, you can call document.execCommand("defaultparagraphseparator", false, "p"), although it will not work in current Firefox (although hopefully it will in a few versions).

Actually, though, it looks like I was wrong.  Edge does still produce &lt;p>.  I don't know what happened, I was sure I got it producing &lt;div>.  This change may still be good, though, because it's still what Blink/WebKit do, and I was told they're not likely to change, and with default styles &lt;div> is closer to what Firefox now does.  So Edge is still the only one out.  I guess I'll have to figure out what Firefox will do before deciding whether to make a new PR.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/pull/146#issuecomment-242400552

Received on Thursday, 25 August 2016 14:11:40 UTC