Modifying HTML tags

Last post 01-20-2007, 9:11 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  01-20-2007, 9:06 PM 25972

    Modifying HTML tags

    Hi Adam

    I've run into a bit of a problem and was wondering if you can help…

    When I’m inserting images from the factory insert image form I need to keep the image path relative as there are multiple servers and the cute editor sits in a different folder structure to where the images are actually being displayed causing the image not to display.

    One way of solving this would be to put a squiggle ~ in front on the URL and the .net engine will step down the folders and render the correct path. E.g “~/images/myExampleImage.jpg”

    Is there a file that I can alter the <img> tag declaration so that I can add runat=server into the tag so that I can use ~?

    Thanks for your help

    Andrew

  •  01-20-2007, 9:11 PM 25973 in reply to 25972

    Re: Modifying HTML tags

    Andrew,
     
    If you want to add server side image control, you need to set Editor.AllowEditServerSideCode Property to true.
     
    Editor.AllowEditServerSideCode Property
    By default Cute Editor doesn't allow edit the Server side code. When this property is set to true, Cute Editor will allow edit the Server side code. (<%@ Page Language="C#" %> <%=MyString %> <asp:textbox id="textbox1" runat="server"></asp:textbox>)
     
    ----------------------------
     
    But I don't thinks this is the solution to your problem. If you have more 10 images on the page, will you add 10 image controls and let .net run it for you?
     
    The best way for your issue is using absolute paths without the domain name ( <a href="http://cutesoft.net/default.aspx">Home</a> ).
     
     

    Cute Editor support three standard ways to create links:

    1. absolute paths without the domain name ( <a href="http://cutesoft.net/default.aspx">Home</a> )
    2. absolute paths with the domain name ( <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 Cute Editor, you need to use the following two properties:


    Editor.RemoveServerNamesFromUrl Property
    :

    By default Internet Explorer converts all URLs in hyperlinks (anchor tags) and images (img tags) to absolute URLs with the hostname name. 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.

    Editor.UseRelativeLinks Property:

    By default Internet Explorer converts all URLs in hyperlinks (anchor tags) absolute URLs. When this property is set to true, Cute Editor should strip the absolute link paths.


    Use absolute paths without the domain name.  


    To use absolute paths without the domain name, you need to set Editor.RemoveServerNamesFromUrl property to true (by default).

    Example:

    <CE:Editor id="Editor1" RemoveServerNamesFromUrl="true" runat="server"></CE:Editor>

     

    Use 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>

     

    Use relative paths  

     


    To relative paths, you need to set Editor.RemoveServerNamesFromUrl property to true and Editor.UseRelativeLinks property to true .

    Example:

    <CE:Editor id="Editor1" RemoveServerNamesFromUrl="true" UseRelativeLinks="true" runat="server"></CE:Editor>

     

     
     

    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

View as RSS news feed in XML