Skip to content Skip to sidebar Skip to footer

Cannot See Line Break
When Highlighted

In a div content editable, when highlighting, I can't see the thickness of the BR just like this: I want it to be like this in MS Word (Updated: Typo earlier -- wrong syntax as p

Solution 1:

Put &nbsp; after <br> tag.

<divcontenteditable='true'><div><h4>test 1</h4><span>test
<br/><br/>
test
</span></div><div><h4>test 2 </h4><span>test
<br>&nbsp;<br>
test
</span></div><div><h4>test 3</h4><span>test
<br/>&nbsp;<br/>
test
</span></div></div>

UPDATE :

This works, because just like MSWord, you should put white space for a new line (&nbsp; for HTML). So you can highlight the text and see the new lines.

Post a Comment for "Cannot See Line Break
When Highlighted"