Using the Upload Button in the Insert Image Dialog

Last post 04-10-2009, 10:15 AM by Chaplain Doug. 6 replies.
Sort Posts: Previous Next
  •  04-09-2009, 1:43 PM 50937

    Using the Upload Button in the Insert Image Dialog

    I am not sure what the Upload button in the insert image dialog is for.  When I press it, nothing happens.  What I was hoping is that it would allow me to browse to an image file on my system, then upload it to one of the image directories on my web site (the directories shown in the insert image dialog).  Please advise.  Thank you.
  •  04-09-2009, 1:56 PM 50938 in reply to 50937

    Re: Using the Upload Button in the Insert Image Dialog

  •  04-09-2009, 5:38 PM 50951 in reply to 50938

    Re: Using the Upload Button in the Insert Image Dialog

    In the example link you provided the upload button worked as I was expecting.  it allowed me to browse to one of my local foldrss and upload to the web folder opened in the dialog.  When I press the upload button on my site, nothing appears or happens.  Any ideas?
  •  04-09-2009, 5:39 PM 50952 in reply to 50938

    Re: Using the Upload Button in the Insert Image Dialog

    Could you provide me with the html code for the editor control in your example page?
  •  04-10-2009, 1:32 AM 50964 in reply to 50952

    Re: Using the Upload Button in the Insert Image Dialog

    Hi Chaplain,
     
    Here is the code of that page, you can also fine the code in the download package:
     
    Download:
     
     

    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="cutesoft" TagName="banner" Src="banner.ascx" %>
    <%@ Register TagPrefix="cutesoft" TagName="leftmenu" Src="leftmenu.ascx" %>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
        <head>
      <title>ASP and ASP.NET WYSIWYG Editor - Default Configuration </title>
      <link rel="stylesheet" href="../example.css" type="text/css" />
     </head>
     <body>
            <form runat="server">
       <cutesoft:banner id="banner1" runat="server" /> 
       <table>
        <tr>
         <td valign="top" nowrap id="leftcolumn" width="160">
          <cutesoft:leftmenu id="leftmenu1" runat="server" />    
         </td>
         <td width="20" nowrap></td>
         <td valign="top">
          <h1>Enable All Toolbars</h1>
          This example show you <b>all the predefined buttons</b>. <br><br>
             
          <asp:radiobuttonlist id="ConfigureList" runat="server" autopostback="True" RepeatDirection="Horizontal" onselectedindexchanged="Configure_Changed">
           <asp:ListItem value="Full">Full</asp:ListItem>
           <asp:ListItem value="Full_noform">Full_noform</asp:ListItem>
           <asp:ListItem value="Default" Selected="True">Default</asp:ListItem>
           <asp:ListItem value="Compact">Compact</asp:ListItem>
           <asp:ListItem value="Simple">Simple</asp:ListItem>
           <asp:ListItem value="Minimal">Minimal</asp:ListItem>
           <asp:ListItem value="None">None</asp:ListItem>
          </asp:radiobuttonlist>
          <CE:Editor id="Editor1" EditorWysiwygModeCss="../example.css" runat="server" ></CE:Editor><br />
          <asp:Button id="btnUpdate" onclick="Submit" Runat="server" Text="Show HTML"></asp:Button>
          <asp:Literal ID="Literal1" Runat="server" />
         </td>
        <tr>
       </table>   
      </form>
     </body>
    </html>

    <script runat="server">
     void Page_Load(object sender, System.EventArgs e)
      {
         if (IsPostBack)
      {
       Literal1.Text = "<h2>The HTML you typed is...</h2><br>";
       Literal1.Text += Server.HtmlEncode(Editor1.Text);
         }
      else
      {
    //   Editor1.Text = "Type Here";
       Editor1.Text = @"<table cellspacing=""4"" cellpadding=""4"" bgcolor=""#ffffff"" border=""0""> <tbody> <tr> <td> <p> <img src=""http://cutesoft.net/Uploads/j0262681.jpg"" width=""80"" alt=""""/></p></td> <td> <p>When your algorithmic and programming skills have reached a level which you cannot improve any further, refining your team strategy will give you that extra edge you need to reach the top. We practiced programming contests with different team members and strategies for many years, and saw a lot of other teams do so too.  </p></td></tr> <tr> <td> <p>  <img src=""http://cutesoft.net/Uploads/PH02366J.jpg"" width=""80"" alt="""" /></p></td> <td> <p>From this we developed a theory about how an optimal team should behave during a contest. However, a refined strategy is not a must: The World Champions of 1995, Freiburg University, were a rookie team, and the winners of the 1994 Northwestern European Contest, Warsaw University, met only two weeks before that contest.  </p></td></tr></tbody></table> <br /> <br />";
      }
     
     }
     public void Submit(object sender, System.EventArgs e)
     {
      Literal1.Text = "<h2>The HTML you typed is...</h2><br>";
      Literal1.Text += Server.HtmlEncode(Editor1.Text);
     }
     
     private void Configure_Changed(Object sender, EventArgs e)
     {
      switch(ConfigureList.SelectedItem.Value)
      {
       case "Full":
        Editor1.AutoConfigure  = AutoConfigure.Full;
        break;
        
       case "Compact":
        Editor1.AutoConfigure  = AutoConfigure.Compact;
        break;
        
       case "Full_noform":
        Editor1.AutoConfigure  = AutoConfigure.Full_noform;
        break;
        
       case "Simple":
        Editor1.AutoConfigure  = AutoConfigure.Simple;
        break;
        
       case "Minimal":
        Editor1.AutoConfigure  = AutoConfigure.Minimal;
        break;
        
       case "None":
        Editor1.AutoConfigure  = AutoConfigure.None;
        break;
      } 
     }
    </script>

     
     
    Regards,
     
    Ken
  •  04-10-2009, 9:15 AM 50978 in reply to 50964

    Re: Using the Upload Button in the Insert Image Dialog

    I was hoping that I would see something in your editor parameters that enabled the upload image button.  I do not see anything there.  So the problem still remains that my Upload button in the insert image dialog does nothing.  I would appreciate any ideas that would fix this issue as this function is essential for our use of the Cute Editor.  Thank you.  Below see one example of our code for using the Cute Editor, in which the upload does not work:
     

    <CE:Editor ID="Editor1" runat="server" AutoConfigure="Simple" EditorBodyClass="MyCuteEditorBody" EditorWysiwygModeCss="~/StyleSheets/DefaultStyleSheet.css" ContextMenuMode="Simple" Height="150px" Visible="True" Text="This is the test." Width="100%"><FrameStyle Height="150" Width="100%" /></CE:Editor>

  •  04-10-2009, 10:15 AM 50983 in reply to 50964

    Re: Using the Upload Button in the Insert Image Dialog

    I downloaded and installed the latest version (6) of the Cute Editor.  Now the upload works as expected.  Consider issue closed.  Thank you.
View as RSS news feed in XML