Copied to clipboard

Flag this post as spam?

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


  • Dibs 202 posts 991 karma points
    Sep 25, 2019 @ 11:47
    Dibs
    0

    Override Embed Provider Configuration

    Dear Umbraco Team

    I would like to remove the size dimensions of youTube Emded Provider within Rich Text Editor.

    Can this be done in the tinymceConfig file ?

    Thanks Dibs

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Sep 25, 2019 @ 11:52
    Dave Woestenborghs
    0

    Hi Dibs,

    I think this can be done in the following config file : /config/EmbeddedMedia.config

    There find the entry for the Youtube provider and add a parameter supportsDimension and set it to false.

    Like this :

    <provider name="Youtube" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, umbraco" supportsDimensions="false">
        <urlShemeRegex><![CDATA[youtu(?:\.be|be\.com)/(?:(.*)v(/|=)|(.*/)?)([a-zA-Z0-9-_]+)]]></urlShemeRegex>
        <apiEndpoint><![CDATA[https://www.youtube.com/oembed]]></apiEndpoint>
        <requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco">
          <param name="iframe">1</param>
          <param name="format">xml</param>
          <param name="scheme">https</param>
        </requestParams>
      </provider>
    

    I just tested this on a V7 site and don't see the dimensions anymore.

    Dave

  • Dibs 202 posts 991 karma points
    Sep 25, 2019 @ 12:04
    Dibs
    0

    Hi Dave

    I'm using Umbraco 8, there is no EmdededMedia.config file under the config folder : (

    Thanks Dibs

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Sep 25, 2019 @ 12:51
    Dave Woestenborghs
    100

    Hey Dibs,

    Ah yess.. that changed in V8. This configuration is now completely done in code.

    You can find some documentation here : https://our.umbraco.com/documentation/Extending/Embedded-Media-Provider/

    It seems that the supportsDimension is not supported in V8

    If you need it I would suggest to create a issue for this on the umbraco issue tracker : https://github.com/umbraco/Umbraco-CMS/issues

    Dave

  • Dibs 202 posts 991 karma points
    Sep 26, 2019 @ 14:34
    Dibs
    0

    Thanks Dave

    I created a Embed provider following the documentation, it acts the same as the built in embeds. back office has textbox for url and two boxes for height and width and a contraint check box.

    I would like to control rendering of images and media entered into the RTE. Allow editor to add the image and media but i code how the images and media are rendered within the RTE field on the view.

    Is this possible and what is the best practise, i dont want editors to be able to resize/move images and media within the RTE editor.

    I was thinking adding custom css to the classes rendered by the RTE editor, but not sure if this is the way to do this.

    Any suggestions would be great

    Thanks Dibs

Please Sign in or register to post replies

Write your reply to:

Draft