trsteel88 / TrsteelCkeditorBundle

Symfony2 bundle for easy integration of the CKEditor WYSIWYG
97 stars 58 forks source link

MediaEmbed plugin problem #80

Closed sandello-alkr closed 10 years ago

sandello-alkr commented 10 years ago

I've added mediaembed plugin to add youtube and vimeo videos. But I have problem with allowing iframe. Can anybody help me?

trsteel88 commented 10 years ago

By default CKEditor will strip iframes if they aren't specifically included. Also, the html purifier will strip them. You can fix this with the following config:

trsteel_ckeditor:
    extra_allowed_content: iframe[*]
    html_purifier:
        config:
            HTML.SafeIframe: true
            URI.SafeIframeRegexp: '%%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%%'