User-893317190 posted
Hi sarathi2006,
You could try the code below to move the cursor.
<script src="../Scripts/jquery-1.9.1.js"></script>
</head>
<body>
<div class="container">
<div id="div" contenteditable="true">fddsfg fds dgdfgdsgfdsgd
</div>
<input id="input" type="text" value="12345" />
</div>
<script>
$(function () {
$("#div").focus();
var html = $("#div").html();
$("#div").html("");
try {
// prevent ie showing error, please use try catch , this only works in chrome
document.execCommand("insertHTML", "false", html)
} catch (e) {
}
// the link you provided shows how to do in ie
if ($("#div").html() == "") {
$("#div").html(html)
range = document.body.createTextRange();//Create a range (a range is a like the selection but invisible)
range.moveToElementText(document.getElementById("div"));//Select the entire contents of the element with the range
range.collapse(false);//collapse the range to the end point. false means collapse to end rather than the start
range.select();
}
})
</script>
The result.

Best regards,
Ackerly Xu