Image src changed to include site name

2 posts, 0 answers
  1. Terri-Lynn
    Terri-Lynn avatar
    45 posts
    Member since:
    Dec 2010

    Posted 27 Sep 2011 Link to this post

    Hi all:
    I have a page created that has a RadEditor on it, with ImageManager enabled.  When a user finds the image they want to insert, it pulls the site name along with the file path.  Here are my settings for the editor:

    myEditor.ImageManager.ViewPaths =


    New String() {"~/i"}


    This works fine as the user is directed to this folder.  On insert, however, the src to the image holds details further back like this:
    <img alt="" src="/mysite/i/Atlas_48.png" />

    Is there a way to NOT have the '/mysite/' show up?  I have this on a test server, and when I push it live my site name usually changes (ex. mysitedev turns to mysite), so I need to do a mass update with find and replace.  I'm guessing I'm missing something.  Any help is greatly appreciated.

  2. Stanimir
    Stanimir avatar
    1654 posts

    Posted 30 Sep 2011 Link to this post

    Hello Terri-Lynn,

    Review the following online help article: OnClientPasteHtml. In this article you can find information of how to modify the image just before pasting it in the editor's editing area. The example demonstrates how to check whether the inserted image through the Image manager has an "alt" attribute set and if it doesn't then urge the user to enter an "alt" attribute name, but what you need to do is modify the src attribute of the image (you can use a regular expression here).

    the Telerik team
    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 their blog feed now
Back to Top