JavaScript API setHTML

  •  09-28-2006, 12:50 PM

    JavaScript API setHTML

    Hello,
     
    I'm trying to populate the value/html of the editor when the page loads using the JavaScript API.
     
    Here is the snippet of code which is called at the end of the page just above the </body> tag:
     
    var editor1 = document.getElementById('');
    if (editor1 != null) {
       editor1.setHTML('Some HTML here');
       editor1.FocusDocument();
    }
     
    When the page first loads, the text is populated into the editor as expected.  However, a split second later, the editor content is erased.  How can I make this work?
     
    Thanks,
    Michael
View Complete Thread