Source code

Revision control

Other Tools

Test Info:

<!doctype html>
<div contenteditable>abc<span></span><span></span></div>
<script>
let editor = document.querySelector("div[contenteditable]");
getSelection().collapse(editor, 3);
document.execCommand("inserttext", false, " ");
</script>