Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Embedded videos breaking in wysiwyg even if "video" is allowed #7

Open
john4 opened this issue Oct 20, 2015 · 0 comments
Open

Embedded videos breaking in wysiwyg even if "video" is allowed #7

john4 opened this issue Oct 20, 2015 · 0 comments

Comments

@john4
Copy link

john4 commented Oct 20, 2015

Wrote up the below issue before stumbling upon this forum solution. It's very misleading to be allowed to check Videos and not JavaScript in the "What can users add into the WYSIWYG?" panel, but then strip out the videos. Should probably at least have an error message, if not make Videos disabled when JavaScript disabled. Also mentioned in the forums by mshick here.

wysiwyg

After adding an embedded youtube video to the wysiwyg editor, viewing the html in the editor or 'saving' the item strips away critical data from the embed code. Specifically, all of the attributes on the iframe are removed and the resulting html is left with no video.

On first inserting the video, the editor contains properly formatted tags:

<figure data-type="video">
  <p>
    <iframe class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FXEVlyP4_11M%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXEVlyP4_11M&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXEVlyP4_11M%2Fhqdefault.jpg&amp;key=31a2d8b5de5447f0b129e81f50af7b5b&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="360" scrolling="no" frameborder="0" allowfullscreen=""></iframe>
  </p>
<figcaption></figcaption>
</figure>

After saving:

<figure data-type="video">
  <p>
    <iframe>
    </iframe>
  </p>
<figcaption></figcaption>
</figure>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant