Copied to clipboard

Flag this post as spam?

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


  • Adam Gärdelöv 8 posts 80 karma points
    Oct 28, 2022 @ 07:41
    Adam Gärdelöv
    0

    Using Absolut url for images in RTE

    How can i configure the RTE to use absolute urls for images?

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Oct 28, 2022 @ 10:38
    Huw Reddick
    0

    I'm not certain, but you can probably do something like the views\grid\editors\rte.cshtml does maybe?

    it currently does this

    @using Umbraco.Cms.Core.Templates
    @model dynamic
    @inject HtmlLocalLinkParser HtmlLocalLinkParser;
    @inject HtmlUrlParser HtmlUrlParser;
    @inject HtmlImageSourceParser HtmlImageSourceParser;
    
    @{
        var value = HtmlLocalLinkParser.EnsureInternalLinks(Model?.value.ToString());
        value = HtmlUrlParser.EnsureUrls(value);
        value = HtmlImageSourceParser.EnsureImageSources(value);
    }
    
    @Html.Raw(value)
    
  • Biagio Paruolo 1619 posts 1912 karma points c-trib
    Aug 29, 2024 @ 06:50
    Biagio Paruolo
    0

    I tried this in appsettings but don't works.

     "RichTextEditor": {
              "CustomConfig": {
                "entity_encoding": "raw",
                "relative_urls": false
              },
           }
    
Please Sign in or register to post replies

Write your reply to:

Draft