This is a migrated thread and some comments may be shown as answers.

ImageEditor - ViewPaths

3 Answers 41 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Kalyani
Top achievements
Rank 1
Kalyani asked on 21 Nov 2013, 04:38 AM
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

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 21 Nov 2013, 01:01 PM
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.
0
Kalyani
Top achievements
Rank 1
answered on 21 Nov 2013, 07:10 PM
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
0
Ianko
Telerik team
answered on 26 Nov 2013, 11:36 AM
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.
Tags
Editor
Asked by
Kalyani
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Kalyani
Top achievements
Rank 1
Share this question
or