ImageEditor - ViewPaths

4 posts, 0 answers
  1. Kalyani
    Kalyani avatar
    20 posts
    Member since:
    Jul 2011

    Posted 20 Nov 2013 Link to this post

    Hello,

    I have this mark up in my code.   

    <tlrk:RadEditor ID="D0_RadArticle" runat ="server" Width="680px" Height="376px"
       ToolsFile="~/XML/Editor/HelpEditor.xml"   ImageManager-ViewPaths="~/Images/Help"
       AnchorPathToStrip="ihs201"  StripAbsoluteAnchorPaths="true" />

    The client is able to select an image and store it to the database.  The link that is stored is <img alt="" src="/ihs201/Images/Help/Editor/underline.jpg" />.  This is fine when I am in my development server.  But when  I deploy my web pages to a different server I do not want the "/ihs201" in my link.  If the virtual directory name is different then "ihs201" then the images link breaks.  I would rather my link was <img alt="" src="../Images/Help/Editor/underline.jpg" /> .  This link would enable me to access the image in other server with different name.  How do I achieve something like that.

    Thank you,
    Kalyani

  2. Ianko
    Admin
    Ianko avatar
    1956 posts

    Posted 21 Nov 2013 Link to this post

    Hi Kalyani,

    The StripAbsoluteAnchorPaths and AnchorPathToStrip propertiers are not valid for the RadEditor control in the ASP.NET AJAX suite. Please follow Stripping image and anchor paths in RadEditor article for more information.

    To use absolute paths you should enable the MakeUrlsAbsolute content filter. If the case that you want relative paths, you could disable it or use the default settings of the RadEditor. Please follow these materials for more information: 

    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. Kalyani
    Kalyani avatar
    20 posts
    Member since:
    Jul 2011

    Posted 21 Nov 2013 Link to this post

    Hello,

    Thank you for the reply.  I understand that I could use MakeUrlsAbsolute or turn it off.   I do not need the absolute url.  I also removed  StripAbsoluteAnchorPaths and AnchorPathToStrip.   I redid my html code to this -
    <tlrk:RadEditor ID="D0_RadArticle" runat ="server" Width="680px" Height="376px"
       ToolsFile="~/XML/Editor/HelpEditor.xml"  ImageManager-ViewPaths="~/Images/Help" />

    But I still get this as my image source - src="/ihs201/Images/Help/Editor/print.jpg".  But I want it to store it as src="/../Images/Help/Editor/print.jpg.   The only way I can do this now is to do a string manipulation.  Is there some other easier way to do this using telerik?

    Thanks
  4. Ianko
    Admin
    Ianko avatar
    1956 posts

    Posted 26 Nov 2013 Link to this post

    Hello Kalyani,

    The mentioned folder, which you want to strip is the root of the application. There is not a built-in property or functionality that could help you to not show the ROOT folder.

    I can suggest you the following resolutions:

    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top