blob: ea088d1b764a646cf3e55e5f845f3f92688893cc [file] [log] [blame]
<meta name="viewport" content="width=device-width">
<style>
body, html {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
font-family: -apple-system;
font-size: 1em;
}
</style>
<body id="editor" contenteditable>
<p id="first">This is the first paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<p id="second">This is the second paragraph. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</body>
<script>
let text = first.childNodes[0];
getSelection().setBaseAndExtent(text, 0, text, text.data.length);
</script>