Re: Different FilePath

  •  07-22-2005, 3:57 PM

    Re: Different FilePath

    Hi Adam
     
    My code is
     
    <%@ Page Language="VB" ValidateRequest="False" %>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
        <head>
      <title>ASP and ASP.NET WYSIWYG Editor - Edit Static Html Example </title>
      <link rel="stylesheet" href="css/barefoot.css" type="text/css" />
     </head>
        <body >
            <form runat="server"> 
       <CE:Editor id="Editor1" EditorWysiwygModeCss="css/barefoot.css" EditCompleteDocument="true" AllowPasteHtml="false" ThemeType="Office2003_BlueTheme" runat="server"></CE:Editor><BR>
       <asp:Button id="btnUpdate" onclick="Submit" Runat="server" Text="Submit"></asp:Button><br />   
       <asp:textbox id="textbox1" runat="server" TextMode="MultiLine" Height="250px" Width="730px" Font-Name="Arial"></asp:TextBox>         
    </form>
     </body>
    </html>
    <script runat="server">
     Public Sub Page_Load(sender As object, e As System.EventArgs)
     Editor1.FullPage=true
     Editor1.UseRelativeLinks = true
     Editor1.RemoveServerNamesFromUrl = true
     Editor1.DisableAutoFormatting = true
      If Page.IsPostBack Then
       Editor1.SaveFile("news.htm")
       textbox1.Text = Editor1.Text
      Else
       Editor1.LoadHtml("news.htm")
      End If
     
     End Sub
     public Sub Submit(sender As object, e As System.EventArgs)
      Editor1.SaveFile("news.htm")
      textbox1.Text = Editor1.Text
     End Sub
    </script>
     
    File structure is as follows
     
    the above file sits in a folder called new as does the news.htm which I want to edit.  The editor is in a folder called wwwroot/html-editor (the rest of the file structure is exactly the same as the unzipped version of the editor)  I have created a virtual folder on the server called html-editor which points to new/wwwroot/html-editor.
     
    Hope this helps
View Complete Thread