
I just selected the text behind the image (not including the image), but when I restored the selection, the image was also selected.
I used the textrange demo at demos/textrange.html, and edited this content:
313 <p class="demo" id="demo5" contenteditable="true">
314 Select some of this text and manipulate the selection and the formatting using the buttons above.
315 </p>
+ 316 <div style="font-size: 16px; text-align: center; text-indent: 2em;">
+ 317 <p style="text-align:center"><span class="" style="cursor: pointer" ><img src="./football.png"></span></p>
+ 318 </div>
319 <h3>Moving the caret</h3>