fonini / ckeditor-youtube-plugin

CKEditor Plugin to embed Youtube videos.
https://fonini.github.io/youtube-plugin-for-ckeditor-4.html
Do What The F*ck You Want To Public License
51 stars 61 forks source link

Video Poster disappears #46

Closed radiovisual closed 8 years ago

radiovisual commented 8 years ago

After I use ckeditor-youtube-plugin, I immediately see the typical video poster to the video I am embedding in the ckeditor pane:

before

But after I toggle the Source view (using the button shown at the top-left of my screenshots), as soon as I toggle out of Source View, then all I see is this IFRAME box:

after

This behavior also happens after I save the content of the ckeditor to the database and review the content.

So can this be fixed, or is this a limitation of the ckeditor environment?

I am using version 2.1.0 of this plugin.

Trupal00p commented 8 years ago

It seems that the built in iframe plugin is acting first so you see the place holder instead of the video. if you disable the iframe plugin you see the video as if you had just inserted it:

config.removePlugins = 'iframe';

Would be nice if there was a way to only have this happen to youtube iframes, don't know ckeditor well enough to know if that's possible.

radiovisual commented 8 years ago

Thanks @Trupal00p . That was the solution. I am using Python/Django, so I was able to add this to my settings.py file:

CKEDITOR_CONFIGS = {
        # ....
        'removePlugins' : ','.join(
            [
                'iframe',
            ]),
    }

Which is essentially the same as calling config.removePlugins = 'iframe';

Once I did that, the youtube posters appear normally.

:+1: