Image/Hyperlinks (Need Support for Relative & Absolute Paths)

Last post 02-25-2005, 7:02 PM by demmett. 6 replies.
Sort Posts: Previous Next
  •  02-09-2005, 5:15 PM 4018

    Image/Hyperlinks (Need Support for Relative & Absolute Paths)

    When I try to add the elements below, CuteEditor likes to modify the Relative paths.
    I have highlighted the stuff CuteEditor adds in red.
    How can I tell CuteEditor to NOT manipulate this code, just leave it as is??


    Sample Code before Cute Editor modifies the code
    <IMG src="http://test.dev.server.com/imgaes/sample.gif">
    <IMG src="/Images/sample.gif">

    <A href="http://test.dev.server.com/default.asp">Test</A>
    <A href="default.asp">Test</A>
     
    Sample Code after Cute Editor modifies the code
    <IMG src="http://test.dev.server.com/imgaes/sample.gif">
    <IMG src="http://test.dev.server.com/Images/sample.gif">

    <A href="http://test.dev.server.com/default.asp">Test</A>
    <A href="http://test.dev.server.com/default.asp">Test</A>
  •  02-10-2005, 1:31 PM 4039 in reply to 4018

    Re: Image/Hyperlinks (Need Support for Relative & Absolute Paths)

    The ASP version doesn' have the property to convert the absolute paths to relative paths.

    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

  •  02-10-2005, 4:42 PM 4044 in reply to 4039

    Re: Image/Hyperlinks (Need Support for Relative & Absolute Paths)

    Adam,
     
       I don't want the editor to convert the absolute paths to relative paths.
     
       What I want is for the editor to not touch the urls at all. Leave them as the user types them in.
       Right now the editor changes relative URLs which I DON'T want it to do.
     
       Is this possible with this tool?
     
       We have CuteEditor v3. When I switch from HTML to Normal back to HTML is when the links get modified.
     
    Any help would be greatly appreciated.
  •  02-10-2005, 5:04 PM 4045 in reply to 4044

    Re: Image/Hyperlinks (Need Support for Relative & Absolute Paths)

    By default Internet Explorer automatically converts all URLs in hyperlinks (anchor tags) and images (img tags) to absolute URLs.

    In the Cute Editor.NET. there is a property named RemoveServerNamesFromUrl.
     
    When this property is set to true (the default), CuteEditor strips out the local server name from all A and IMG tags if the hostname in the URL matches the current hostname on the serve side.

    We will implement this function in the ASP future version as well.

    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

  •  02-10-2005, 5:41 PM 4047 in reply to 4045

    Re: Image/Hyperlinks (Need Support for Relative & Absolute Paths)

    Is there a place in the Cute Editor tool that I could tell it to call a custom function I create that
    will strip out the local server name from all A and IMG tags.
     
    What I am trying to figure out is what function is being called when the user switches to Normal mode?
    And where in that function, that is being called, should I place my code to call the new function I need to write?
    Or is this not where the link is being reformatted?
     
    Thanks for your help.
  •  02-15-2005, 6:51 AM 4110 in reply to 4047

    Re: Image/Hyperlinks (Need Support for Relative & Absolute Paths)

    Hello Demmet,

     

    I know this is a pain in the ****, and I also struggled with this one at first.... but what you can write a small function that replaces a part of the link...

     

    for example... PAGE 1 on testserver with image gives something like this: <img src=http://testserver.com/images/image01.gif>

     

    Now, if you upload it to a live server, you can add the following function to it (using an include file can help - empty include file on testserver <> function on liveserver)
     
    example function could be :
     
         Content = Request.Form("Editor1_HTMLContent")          ' or database field

         Content = Replace(Content,"http://testserver.com","http://liveserver.com") 

    I think this is a good temporary solution until CuteSoft implement this in the new version of the CuteEditor.
    Hoping to be of any assistance.
     
    Greetings
    Wim
     
     
     
  •  02-25-2005, 7:02 PM 4291 in reply to 4110

    Re: Image/Hyperlinks (Need Support for Relative & Absolute Paths)

    Wim,
     
        I don't know why I did not come up with that. I was trying to make the solution more complicated then what it needed to be.

        Once again, thanks.

    Dave
     
     
View as RSS news feed in XML