Copied to clipboard

Flag this post as spam?

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


  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 04, 2011 @ 13:35
    Anthony Dang
    0

    How to get tinymce to keep absolute image paths?

    I need tinymce to keep absolute image paths, not strip them. I tried the advice in this post about setting these in the tinymce config:

     

    <config key="relative_urls">false</config>
    <config key="convert_urls">false</config> 

    http://blog.ovesens.net/2011/01/umbraco-tinymce-converting-absolute-to-relative-url/

    It doesnt seem to work though.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 04, 2011 @ 14:01
    Jeroen Breuer
    1

    Not really sure if there is a good solution for this. Here is my workaround: http://our.umbraco.org/forum/developers/extending-umbraco/20810-Embed-image-in-email#comment78715

    Perhaps it's related to this bug: http://umbraco.codeplex.com/workitem/27431

    Jeroen

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 04, 2011 @ 14:31
    Anthony Dang
    0

    Thanks Jeroen

    I was hoping that there was a config setting that I was missing. Parsing and inserting was my last option.

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jul 04, 2011 @ 14:47
    Anthony Dang
    0

    Thanks Jeroen

    Your solution worked first go.

     It's a bit annoying having to do this though. I pasted in a url, only to have it stripped out, then having to parse the markup to put it back in again.

     

     

  • Eric Schrepel 161 posts 226 karma points
    Mar 19, 2013 @ 18:41
    Eric Schrepel
    0

    I'd like to elevate this issue; just started creating newsletters within Umbraco 6 (great!) only to have no way to force absolute URLs (horrible!). I appreciate Jeroen's workaround but the proper answer should be for Umbraco to honor the tiny_mce.config settings, as it does with most other .config file settings. Why does it not?

  • Nigel Wilson 944 posts 2076 karma points
    Mar 20, 2013 @ 01:05
    Nigel Wilson
    0

    Hi Eric

    A solution that I have seen used, and used myself, in respect of XSLT is to develop an xslt extension method that takes the relative path of an image and returns the fully qualified path.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Xml;
    using umbraco.presentation.umbracobase;
    using umbraco;

    namespace Your.namespace
    {
        [XsltExtension]
        public class xsltExtensions
        {
            [RestExtensionMethod]
            public static string GetAbsoluteUrl(string relativePath)
            {
                return "http://" + HttpContext.Current.Request.Url.Authority + relativePath;
            }
        }
    }

    I apprecaite the above may not be an aboslutely suitable solution for V6 but thought it might provide food for thought for you.

    Cheers

    Nigel

Please Sign in or register to post replies

Write your reply to:

Draft