In the RTE there are an embed option, where one can add a YouTube link to embed the video in to the text, I need to be able to edit the embedded iframe. It’s not an option for the client to “just” edit the code using source code editor..
Yes I have seen that, but there’s already one for YouTube. So I thought there would be a way to adjust the attributes just for the iframe. If I’m going to recreate the provider, is there a way to know the exact current setup and are they not going to collide?
I've not done it myself, but you could probably create an Embed Provider that inherits from the core YouTube one and then override theGetMarkup method. Then in the composition, you could remove the core YouTube provider and register your own.
This would mean that your's is essential the core one, just with one method overridden, in turn meaning it should "just work" and there should be no conflict.
The proposed solution is feasible, however, with the problem that the output of the oEmbed result by design is not easy to change, since you receive the full iframe and not just the values.
How to edit the default youtube embed provider ?
I need to change the default youtube embed provider markup, does anyone know how to do it?
Hi Benjamin,
To edit where? Where do you want to edit youtube embed markup?
Thanks,
Alex
In the RTE there are an embed option, where one can add a YouTube link to embed the video in to the text, I need to be able to edit the embedded iframe. It’s not an option for the client to “just” edit the code using source code editor..
You can add custom embedded provider - https://our.umbraco.com/documentation/extending/Embedded-Media-Provider/
Yes I have seen that, but there’s already one for YouTube. So I thought there would be a way to adjust the attributes just for the iframe. If I’m going to recreate the provider, is there a way to know the exact current setup and are they not going to collide?
I've not done it myself, but you could probably create an Embed Provider that inherits from the core YouTube one and then override the
GetMarkup
method. Then in the composition, you could remove the core YouTube provider and register your own.This would mean that your's is essential the core one, just with one method overridden, in turn meaning it should "just work" and there should be no conflict.
As I say, not tried it, but should be possible.
Nik
The proposed solution is feasible, however, with the problem that the output of the oEmbed result by design is not easy to change, since you receive the full iframe and not just the values.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.