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

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

@john4

Description

@john4

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions