No internet connection
  1. Home
  2. Support

iframes

By Cody @codywarmbo2018-08-25 19:47:28.358Z

Do iframes not work? Trying to share a YouTube video in my forum.

Solved in post #2, click to view
  • 5 replies
  1. KajMagnus @KajMagnus2018-08-27 13:32:31.889Z

    Inserting an <iframe> directly won't work, however you can paste the YouTube share link in its own paragraph:

    https://youtu.be/Eh44QPT1mPE?t=1m24s

    and the video then gets embedded, like so:

    What's the iframe HTML you wanted to paste? (Maybe it'd be good if some time later, inserting that html directly, also works fine)

    Reply1 LikeSolution
    1. CCody @codywarmbo2018-08-27 21:51:49.894Z

      For some reason it was not embedding when I pasted the link. It's working now!

      1. KajMagnus @KajMagnus2018-08-31 02:05:23.599Z

        Hmm, maybe a newline before the link, was missing, or something like that. ... Maybe would be better if the video link didn't need to be in its own paragraph, only on its own line, hmm. Anyway I'll mark this as solved for now then

      2. In reply toKajMagnus:
        CCody @codywarmbo2018-10-01 01:05:53.485Z

        Is it possible to force an iframe to work? I am trying to embed a Discord chat window into a custom HTML topic.

        1. KajMagnus @KajMagnus2018-10-01 05:39:33.452Z

          The <iframe> gets removed by the sanitizer. I like the idea of embedding things (like the Discord chat) in custom HTML pages. Maybe admins + developers / designers, should be able to use any kinds of tags, on custom HTML pages. And all other people should then be prohibited from editing those pages.

          In some cases, maybe the staff wants to embed an <iframe> with something cool, in the original post in a normal discussion topic, and have people post feedback. Maybe there should be a per page setting like:

          [x] Allow all HTML tags on this page, and let only admins edit it
          

          Won't have time to fix this the nearest week(s). Maybe a workaround can be to insert the <iframe> via Javascript that runs a second after the page has loaded. If you add a tag like <div class="cpce_DiscordIframe></div> and find and replace it with a Discord iframe.