Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Thijs Kuipers 43 posts 66 karma points
    Jan 27, 2012 @ 16:16
    Thijs Kuipers
    0

    Image with external URL (Google Maps Static API) in RichText Editor

    I've got an image from the Google Maps Static API that I would like to insert in the RTE. When I paste the HTML and "update", the image looks fine, but as soon as I save, the src-attribute of the img-element is replaced by "/".

    Specifically, this is what I try to insert:

    <a href="http://maps.google.com/maps?q=Groene+Hart+Ziekenhuis,+Graaf+Florisweg,+Gouda,+Nederland" target="_blank">
    <img src="http://maps.googleapis.com/maps/api/staticmap?size=430x430&amp;sensor=false&amp;language=nl&amp;markers=color:green%7CGroene%20Hart%20Ziekenhuis,Graaf%20Florisweg%2077-79,2805AH%20Gouda&amp;scale=2" alt="Google Maps"/>
    </a>

    Which, after I save, is turned into:

    <a href="http://maps.google.com/maps?q=Groene+Hart+Ziekenhuis,+Graaf+Florisweg,+Gouda,+Nederland" target="_blank"><img src="/" alt="Google Maps" /></a>

    I've looked at the "validElements"-element in the tinyMceConfig.config, but I can't find the reason why the img-element's src-attribute would be invalid.

    Can anyone shed any light on this behaviour?

  • alimac 182 posts 371 karma points
    Jan 27, 2012 @ 16:25
    alimac
    0

    I think it's because TinyMCE uses relative URLs by default. You may want to have a look at this: http://www.tinymce.com/wiki.php/TinyMCE_FAQ#Paths.2FURLs_are_incorrect.2C_I_want_absolute.2Frelative_URLs.3F

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jan 27, 2012 @ 17:12
    Jeroen Breuer
    0

    Have you tried to change the valid elements to this to see if that might work? 

    <validElements><![CDATA[*[*]]]></validElements>

    Also in umbracoSettings.config you could try this:

    <TidyEditorContent>False</TidyEditorContent>

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft