type link in the hyperlink information window

Last post 09-27-2007, 1:27 AM by Koen_L. 5 replies.
Sort Posts: Previous Next
  •  09-25-2007, 9:45 AM 33804

    type link in the hyperlink information window

    Hi ,
     
    I would like to set the type (http://) as standard in the hyperlink information window .
    Because i assume that my users will not type a full url and don't understant the differnce between the available types .
     
    How can i set this as a fixed value ?
     
    Greetings
  •  09-25-2007, 10:15 AM 33806 in reply to 33804

    Re: type link in the hyperlink information window

    Koen_L,
     
    If you set URLType property to Absolute, Cute Editor will automatically convert the URL to full path.
     
    Demo:
     
     

    Absolute and Relative Paths - Using URLs Effectively


    When you're creating links to documents and images on the Web, you need to think about how you're going to link to them.

    CuteEditor supports three standard ways to create links:

    1. Site root relative path ( <a href="http://cutesoft.net/default.aspx">Home</a> )
    2. Absolute path ( <a href="http://cutesoft/default.aspx">Home</a> )
    3. Relative paths ( <a href="default.aspx">Home</a> or <a href="#top">Top</a>)  

     

    To create links correctly in CuteEditor, you need to use Editor.URLType Property and URLType Enumeration.

    Editor.URLType Property

    Specify whether the URL should be converted to a site root relative path (/html/images/image1.gif) or an absolute path (http://www.mysite.com/images/image1.gif).

    URLType Enumeration



    Member Name Description
    Default The URL is not converted.
    SiteRelative The URL is converted into a site root relative path. A site root relative path describes the location of the destination file by describing the route the browser must take from the Web site's root folder (top level in the folder structure). For example, a site root-relative path to an image may appear as: /html/images/image1.gif
    Absolute The URL is converted into an absolute path. An absolute path describes the physical location of a file on a machine or the exact location of a file on the Internet. An absolute path on your hard drive might appear as: An absolute path might appear as: http://www.mysite.com/images/image1.gif

    If you still want to do that, please follow the steps below:
     
    1. Open Tag_A.ascx
     
    2. In the bottom of this file, copy and paste the following code:
     
    <script>
    function Update_sel_protocol (src)
    {
     var found=false;
     for(var i=0;i<sel_protocol.options.length;i++)
     {
      var val=sel_protocol.options(i).value;
      if(src.substr(0,val.length).toLowerCase()==val)
      {
       if(sel_protocol.selectedIndex!=i)
        sel_protocol.selectedIndex=i;
       found=true;
       break;
      }
     }
     //set others
     if(!found)
      sel_protocol.selectedIndex=0;
    }
    </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

  •  09-26-2007, 1:35 AM 33815 in reply to 33806

    Re: type link in the hyperlink information window

    If you set URLType property to Absolute, Cute Editor will automatically convert the URL to full path.
     
    Where can i find this function ?
  •  09-26-2007, 1:45 AM 33816 in reply to 33815

    Re: type link in the hyperlink information window

    When using this example it works fine when you type a url like www.google.be in the editor itself.
    But i am talking about the hyperlink information window where you can select Type : http:// , https:// , ftp:// , news:// ,... .
     
    I want to set it standard to http:// and don't leave my users the choice between them.


    Using Absolute Paths With the Domain Name

     


    To use absolute paths with the domain name, you need to set Editor.RemoveServerNamesFromUrl property to false and Editor.UseRelativeLinks property to false .

    Example:

    <CE:Editor id="Editor1" RemoveServerNamesFromUrl="false" UseRelativeLinks="false" runat="server"></CE:Editor>
  •  09-26-2007, 9:05 AM 33833 in reply to 33816

    Re: type link in the hyperlink information window

  •  09-27-2007, 1:27 AM 33855 in reply to 33833

    Re: type link in the hyperlink information window

    The script works fine to auto select http:// as type.
    The url is still then servername+www.google.be and not http://www.google.be .
     
    This i also have set :
    RemoveServerNamesFromUrl="true" UseRelativeLinks="true"
    This works fine when typing in the editor itself .
     
    So what does not work is typing an url like www.google.be in the Hyperlink information window .
    Then i still get servername+www.google.be.
View as RSS news feed in XML