Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi i am trying to add a new provider for embed on the rich text editor, every where ive looked online is saying add it to embeddedmedia.config but i dont seem to have this file! Im using v8 if anyone could shed some light that would be great. Also how do i use ifame in umbraco v8?
It's the same theory as in V7, except in V8 'a lot' of the configuration has moved from configuration files into code.
So for example if you wanted to create a new Embed provider for the DeviantArt website (like in the v7 documentation).. you'd create a provider like so:
public class DeviantArtEmbedProvider : EmbedProviderBase
public override string ApiEndpoint => "https://backend.deviantart.com/oembed?url=";
public override string UrlSchemeRegex => new string
public override Dictionary<string, string> RequestParams => new Dictionary<string, string>();
public override string GetMarkup(string url, int maxWidth = 0, int maxHeight = 0)
var requestUrl = base.GetEmbedProviderUrl(url, maxWidth, maxHeight);
var oembed = base.GetJsonResponse<OEmbedResponse>(requestUrl);
This replaces what you would have added to the embeddedmedia.config file.
And then there is a further step to let Umbraco know about the provider, add a new class to your project inheriting 'IUserComposer' and we can use the OEmbedProviders extension method to add the new provider in eg:
public class RegisterEmbedProvidersComposer : IUserComposer
public void Compose(Composition composition) => composition.OEmbedProviders().Append<DeviantArtEmbedProvider>();
I'm trying this but its not hitting
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted