I am using the CKE as an addon for a CMS. The plugins to be loaded are configurable.
The oembed-plugin needs some extra configuration, so I tried to add it on instanceLoaded (after CKEDITOR.replace(...config here...)):
CKEDITOR.once( 'instanceLoaded', function( evt ) {
var editor = evt.editor;
if ( CKEDITOR.plugins.loaded['oembed'] ) {
editor.config.extraAllowedContent = 'iframe[*]';
}
});
But unfortunately, this doesn't work. The IFrame is still stripped from the content.
It works if I add it directly to the replace(...), so I think it's a timing problem. (?) Can anyone help?
I need a programmatical solution 'cause this may affect other plugins, too.
Thank you!
I'm not expert but ...
Have you tried adding the iframe[*] config string to the allowedContent property, instead of extraAllowedContent?