2010-10-08 23:49:47 +04:00
|
|
|
<!DOCTYPE HTML><html><head>
|
|
|
|
</head>
|
|
|
|
<body>
|
2014-01-24 18:18:00 +04:00
|
|
|
<span>not editable</span><span id="x" contenteditable="true" spellcheck="false">navigable|unnavigable</span>
|
2010-10-08 23:49:47 +04:00
|
|
|
<script>
|
|
|
|
// Position the caret after "u"
|
|
|
|
var sel = window.getSelection();
|
|
|
|
sel.removeAllRanges();
|
|
|
|
var range = document.createRange();
|
|
|
|
var x = document.getElementById('x');
|
|
|
|
var t = x.firstChild;
|
|
|
|
range.setStart(t, 11);
|
|
|
|
range.setEnd(t, 11);
|
|
|
|
sel.addRange(range);
|
|
|
|
x.focus();
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|