+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Newsletter Module: Can't add hyperlink around image

Newsletter Module: Can't add hyperlink around image

4 posts, 0 answered
  1. Chanan Zass
    Chanan Zass avatar
    123 posts
    Registered:
    21 Aug 2012
    30 Sep 2011
    Link to this post
    Greetings,

    The newsletter RadEditor does not allow adding a link around an image.
    We'd like to add image buttons that invite readers to click in order to navigate to certain pages on our site.

    Other RadEditors of generic content around the Sitefinity CMS allow adding links around image without a problem.
    The newsletter module allows you to add an imagemap, but that would be too complicated for our editors.

    Any idea why that is?
    Thanks in advance.
  2. Chanan Zass
    Chanan Zass avatar
    123 posts
    Registered:
    21 Aug 2012
    01 Oct 2011
    Link to this post
    Actually, after further examination, the linksEditorDialog in the Newsletter module does not allow adding a link to an existing object, neither text nor image.
    That is, if you enter some text, then select it and try to add link, the selected text is not picked up (you get an undefined object).

    Source of problem (at least our problem) appears to be at
    /Sitefinity/Admin/ControlTemplates/Notifications/NewsletterContent.ascx.

    Are we the first to encounter this?

    P.S. It would be nice to also have some control over where images are saved. Currently you can save images only in the ~/Images folder or in existing Images & Documents libraries. We'd like to save them in folders and libraries that are dedicated to newsletters.
  3. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    30 Nov 2016
    05 Oct 2011
    Link to this post
    Hi Chanan,

    Images are added with sfref instead with <img> tag. Adding link to this sfref tag will not preserve the image because this will not be valid html. If you take the href attribute and add it to <img> tag you will be able to add link to this.

    To save files in in different files on your file system please follow the solution provided here.

    Greetings,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Chanan Zass
    Chanan Zass avatar
    123 posts
    Registered:
    21 Aug 2012
    05 Oct 2011
    Link to this post
    Thanks a lot for replying.

    The img tag that gets inserted by Library Image Insert dialog is in the following format:

    <img width="126" height="156" width="126" height="156" alt="first" src="http://localhost/telerik/MarangoniCommercial3.7/Libraries/GalleryTest/first.sflb.ashx" sfref="[Libraries]d2f91ae9-8f35-4c22-a969-3ab124e6946e"></img>

    It is a "browser-readable" image tag.

    Indeed, while doing some trial-and-error editing of the NewsletterContent template (/Sitefinity/Admin/ControlTemplates/Notification/NewsletterContent.ascx), we've discovered that commenting out the "LinkManager" function -- beginning with
    Telerik.Web.UI.Editor.CommandList["LinkManager"] = function(commandName, editor, args)

    we get a HyperLink dialog widget that works just fine (though you have to enter the URL manually), preserving the image.

    A mystery.


Register for webinar
4 posts, 0 answered