To reproduce: 0. Launch Blot_editableDiv_showSource, my modified version of "Blot" available from <http://dan.karelia.com/webkit/Blot_editableDiv_showSource.zip> with DYLD_FRAMEWORK_PATH pointing to TOT. (I'm using r18941) 1. Click in the top panel. 2. Type "Hello" and hit the return key Results: The contents of the editable DIV are: Hello.<div><br class="webkit-block-placeholder"></div> Expected: There shouldn't be an internal webkit class. Also the empty divs surrounding a <br> are weird -- I would expect there to be something like just a <br> but not enclosed in a div.
Note also that the DIV does not self-close, it's not proper XHTML
If you want <br>s on carriage returns you could override insertNewline: and insertParagraphSeparator: and call insertLineBreak:, or you could use custom keybindings in your app. I'm going to make this bug about the seemingly unnecessary -webkit-block-placeholder class on the br. Please file a separate bug for the fact that the <br>s aren't self closing.
<rdar://problem/5685601>
r30016