PasteHTML moving content to the beginning of the editor?

  •  04-20-2007, 10:58 PM

    PasteHTML moving content to the beginning of the editor?

    My Javascript code follows.   The PasteHTML puts the string at the beginning of the editor's content, regardless of the original position of 'selectedhtml'
     
     
    var editor1 = document.getElementById('');
    var editor1doc = editor1.GetDocument();
    var selectedhtml = editor1doc.selection.createRange().htmlText;
    editor1.PasteHTML("**BEFORESELECTION**" + selectedhtml + "**AFTERSELECTION**");
View Complete Thread