Copied to clipboard

Flag this post as spam?

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


  • Benjamin Stengaard 27 posts 141 karma points
    Apr 28, 2020 @ 13:35
    Benjamin Stengaard
    0

    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?

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Apr 28, 2020 @ 16:19
    Alex Skrypnyk
    0

    Hi Benjamin,

    To edit where? Where do you want to edit youtube embed markup?

    Thanks,

    Alex

  • Benjamin Stengaard 27 posts 141 karma points
    Apr 28, 2020 @ 16:39
    Benjamin Stengaard
    0

    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..

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Apr 28, 2020 @ 16:43
  • Benjamin Stengaard 27 posts 141 karma points
    Apr 28, 2020 @ 16:52
    Benjamin Stengaard
    0

    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?

  • Nik 1413 posts 6212 karma points MVP 3x c-trib
    Apr 28, 2020 @ 17:33
    Nik
    102

    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.

    As I say, not tried it, but should be possible.

    Nik

  • Benjamin Stengaard 27 posts 141 karma points
    May 06, 2020 @ 07:24
    Benjamin Stengaard
    1

    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.

  • 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.

Please Sign in or register to post replies