Support forums
in

Different FilePath

Last post 07-22-2005, 3:57 PM by joenineo. 8 replies.
Sort Posts: Previous Next
  •  07-21-2005, 11:53 AM 8949

    Different FilePath

    Hi
     
    I have got the editor working fine, but I want to be able to edit files OUTSIDE of the Cute_editor folder.  I am using the editHtml.aspx as a test and have tried loads of different ways, none that work.  Here is the original code.
     
    <%@ 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="../example.css" type="text/css" />
     </head>
        <body >
            <form runat="server"> 
       <h1>Edit Static Html</h1><hr/>   
       This example demonstrates you can use Cute Editor to edit static html page.<br/>   
       <span>
        Below is an example page that displays a document held in an HTML file on the hard drive. When you submit the form, the document is saved back to the drive. <br/><a href="document.htm"><b>Check the document.htm</b></a>
       </span>
       <br><br>
       <CE:Editor id="Editor1" EditorWysiwygModeCss="../example.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)
     
      If Page.IsPostBack Then
       Editor1.SaveFile("document.htm")
       textbox1.Text = Editor1.Text
      Else
       Editor1.LoadHtml("document.htm")
      End If
      
     End Sub
     public Sub Submit(sender As object, e As System.EventArgs)
      Editor1.SaveFile("document.htm")
      textbox1.Text = Editor1.Text
     End Sub
    </script>
     
    Now my application runs in a folder httpdocs\wwwroot\hmtl-editor\ which runs fine but how do I edit a file called document.htm in the folder httpdocs\new using the code above?
     
    If I add the FilesPath parameter I get the following error.
     
     

    Server Error in '/html-editor' Application.

    Runtime Error

    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>

    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>

    If I put all the html and image folders within cute_editor it works but I don't want to do that.
     
    PLEASE HELP IT IS DRIVING ME MAD
     
    SORRY IF THIS IS EASY QUESTION BUT I AM A NEWBIE TO .NET editor
  •  07-21-2005, 12:44 PM 8950 in reply to 8949

    Re: Different FilePath

    Try:
     
    <script runat="server"> Public Sub Page_Load(sender As object, e As System.EventArgs) If Page.IsPostBack Then Editor1.SaveFile("/httpdocs/new/document.htm") textbox1.Text = Editor1.Text Else Editor1.LoadHtml("/httpdocs/new/document.htm") End If End Sub public Sub Submit(sender As object, e As System.EventArgs) Editor1.SaveFile("/httpdocs/new/document.htm") textbox1.Text = Editor1.Text End Sub </script>

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-22-2005, 1:13 AM 8970 in reply to 8950

    Re: Different FilePath

    Thanks for that but I get the same error!
     
    Do you know how to use FilesPath ?  This would seem to be the thing I need to use.
  •  07-22-2005, 5:34 AM 8972 in reply to 8970

    Re: Different FilePath

     
     
     
    The error is realted to the web configuration file web.config goto that file and delete the customerrors tags and everything inside it. You hosting ISP has a machine.config file and does not allow users to use sutom errors. hope that helps
  •  07-22-2005, 7:01 AM 8973 in reply to 8972

    Re: Different FilePath

    I tried that and it still won't get rid of links back to the cuteeditor.  The problem I have is that all the graphics are trying to link to http://myhost/CuteSoft_Client/CuteEditor/news/my.jpg
     
    where it should be
     
    http://myhost/news/my.jpg

    I have tried
     
    RemoveServerNamesFromUrl="true" UseRelativeLinks = "true" DisableAutoFormatting = "true"
     
    and all combinations of it.
     
    BUT IT STILL WON'T WORK ARHHHHH!!!!!
     
    My new code looks like this
     
    <%@ 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>
     
    PLEASE HELP IT IS DRIVING ME INSANE!!! The above file is in the same location as the file I am trying to edit if that helps.
  •  07-22-2005, 1:42 PM 8981 in reply to 8973

    Re: Different FilePath

    joenineo,
     
    The code looks OK to me.
     
    Which version of CuteEditor are you using?
     
    Can you download the control again?
     
     
    Make sure you update all the client files and DLL.
     
    Keep me posted.
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-22-2005, 2:57 PM 8988 in reply to 8981

    Re: Different FilePath

    Hi Adam
     
    Thanks for the reply I have just downloaded the latest version (I bought the version that has 10 domains). 
     
    It still won't work the URL is http://www.snow-surfing.com/new/edithtml.aspx
     
    Basically I want to edit the news.htm page which has all the images in a folder called news inside the new folder.
     
    Any IDEAS!!!!
     
    I am new to .NET but can configure most stuff.  The product itself looks amazing and we are going to push it to all our clients, but I need to be able to set it up.
     
    Any help would be great.
     
    Cheers
     
    Joe
  •  07-22-2005, 3:03 PM 8989 in reply to 8988

    Re: Different FilePath

    Joe,
     
    Please use the paste your aspx code.
     
    and explain your site file structure.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-22-2005, 3:57 PM 8992 in reply to 8989

    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 as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems