<!doctype html>
OuterText1
<div>innerText1</div>
OuterText2
<div><img style="width: 10px; height: 10px; background-color: black"></img></div>
OuterText3
<script>
getSelection().setBaseAndExtent(document.body.firstChild, 3, document.body.childNodes[4], 3);
</script>