IE7 contentEditable word wrapping

Posted by Iker Jimenez on Stack Overflow See other posts from Stack Overflow or by Iker Jimenez
Published on 2009-11-11T17:38:15Z Indexed on 2010/05/16 12:40 UTC
Read the original article Hit count: 290

I have the following code:

<html>

<style type="text/css">

DIV { display:inline; border: solid red 1px; }

.editable { background:yellow; }

</style>

<div class="editable" contentEditable="true"> This is test text. This is test text.This is test text.This is test text.This is test text.Thihis is test text.This is test text.</div>

<div class="editable" contentEditable="true"> short </div>

<div class="editable" contentEditable="true"> This is test text.This is test text.This is test text.his is test text.Thihis is test text.Thihis is test text.Thihis is test text.Thi </div>

And I need IE7 (IE6 not needed and FF3.x works fine) to wrap the text correctly, which it does if I remove the contentEditable="true" from the divs. Just try this code with and without contentEditable and you'll see what I mean. Make the browser window small enough so you see how the text wraps.

Thanks.

© Stack Overflow or respective owner

Related posts about internet-explorer-7

Related posts about contenteditable