Forum Moderators: open
function pasteTextInEditor(text)
{
//paste text in the active selection, that is - at the editor's cursor position
editor.focus();
var range = document.selection.createRange();
range.pasteHTML(text);
return false;
}
Can someone tell me what is wrong with this query, I can try the same above but with
editor.innerHTML = "";
and that doesn't work either, am I getting the client ID wrong?
Please advise.
Otherwise, the way to go is through the w3c DOM model using cloneNode and replaceChild. See these references for the general idea:
[mozilla.org...]
[mozilla.org...]
[mozilla.org...]
also:
[developer.apple.com...]
[developer.apple.com...]