Is setHTML() supported in v5.2

  •  07-31-2008, 6:42 AM

    Is setHTML() supported in v5.2

    Is setHTML supported in v 5.2? I ask because no matter what I try I cannot get it to work. Whenever I do I get a "Object doesn't support this property or method" error in IE and "editor1.setHTML is not a function" in FF. In fact I get the same errors if I use the getHTML function too, though if I use alert(editor1.value) this returns the current content of the editor window, so I know the ID I'm using for the editor appears to be correct.
     
    The asp code used to insert the editor in the page is:
     
    <%
    Dim InitialContent
    InitialContent = "<p>Please enter some text.</p>"
    Dim editor
    Set editor = New CuteEditor
    with editor        
        .ID = "CEdit1"
        .ThemeType = "OfficeXP"
        .Text = InitialContent
        .FilesPath = "../CuteEditor_Files"
        .AutoConfigure = "LinkPage"
        .Width = "100%"
        .Height = 300
        .EditorBodyStyle = "table { font:normal 12px arial; }"
        .EditorWysiwygModeCss = "/include/CuteEditor.css"
        .BreakElement = "p"
        .Draw()
    end with
    %>

    The javascript function I'm using to try to populate the editor is:
     
    function setText(theHTML) {
        var editor1 = document.getElementById("CEdit1");
        editor1.setHTML(theHTML);
    }

    setText(theHTML) is called from an ajax function that does a database lookup when a user clicks a link and passes over the results in theHTML - this has been tested and is working correctly.

    Please help before I go mad!
     
    Thanks,
     
    Pete
View Complete Thread