The content area is not editable after calling editdoc.write();

  •  07-09-2007, 4:28 PM

    The content area is not editable after calling editdoc.write();

    Hello Adam,
     
    To solve the background issue (http://cutesoft.net/forums/thread/30608.aspx), you provided me the following code to replace the JavaScript function editor1.setHTML(). It does solve the background issue, but it causes a new problem. After set a new html content to the editor by using your method, the content becomes not editable. Though you can highlight text, you can't delete it. And the cursor disappeared. I have to switch the view to "HTML" and switch back to make it editable. Calling FocusDocument() doesn't help. I'm using IE7. Any idea?

    =============================================================== 
    // get the cute editor instance
    var editor1 = document.getElementById('<%= Editor1.ClientID%>');
    // get the active editor document
    var editdoc = editor1.GetDocument();
    editdoc.open("text/html","replace")
    editdoc.write(h);
    editdoc.close();
     
View Complete Thread