blob: d3c1e7ce942ff66bcee05e9fdbd4519e35ac9eab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
document.addEventListener("DOMContentLoaded", () => {
const textarea = document.querySelector("textarea");
getSelection().selectAllChildren(textarea);
textarea.firstChild.splitText(0);
});
</script>
</head>
<body><textarea>abcd</textarea></body>
</html>
|