Forum Moderators: open
function insertTextAtCursor() {
var TextEditor=document.getElementById("TextEditor");
var FileName=document.getElementById("myList").value;
TextEditor.focus();
TextEditor=document.selection.createRange();
TextEditor.innerHTML += "<a href="+FileName+">"+FileName+"</a>";
}
innerHTML works when i skip the "TextEditor.focus();"
and
"TextEditor=document.selection.createRange();"
Please advice... it's annoying :)