Editor will not load file

  •  03-17-2008, 9:55 AM

    Editor will not load file

    Hello,
     
    I've reviewed the use-CuteEditor-as-document-selector.aspx example and modified the code to view the editor:

    <CE:Editor id="Editor1" runat="server" BorderColor="White" />

    But I can not load a file to the editor. I have not modified the java script funtions. I can see the single file I've saved but when
    inserting, nothing happens. I'm trying to open a htm file previously created in the editor.
     
    Any ideas? Here's the 2 java script functions.

    <Script Language="javascript">

    function callInsertImage()

    {

    var editor1 = document.getElementById('<%=Editor1.ClientID%>');

    editor1.FocusDocument();

    var editdoc = editor1.GetDocument();

    editor1.ExecCommand('new');

    editor1.ExecCommand('insertdocument');

    InputURL();

    }

     

    function InputURL()

    {

    var editor1 = document.getElementById('<%=Editor1.ClientID%>');

    var editdoc = editor1.GetDocument();

    var links = editdoc.links;

    if(links.length>0)

    { document.getElementById("docFld").value = links[links.length-1].href;

    editor1.ExecCommand('new');

    document.getElementById("docFld").focus();

    }

    else

    {

    setTimeout(InputURL,500);

    }

    }

    </script>

View Complete Thread