Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Add plugin to CKeditor

edited May 2011 in Modules
Dea all,

I'm just trying to add a plugin to the CKEditor, but after copying it into the plugins folder and adding its name on MY_fuel.php, nothing happens. The plugin button does not appear on the editor.

Any ideas or directions on that? The plugin is MediaEmbed, and can be found here:

kind regards,


  • edited May 2011
    I just tried it with the following MY_fuel.php configuration change and it seemed to work (note the addition to the toolbar and the extraPlugins):
    $config['ck_editor_settings'] = array( 'toolbar' => array( //array('Source'), array('Bold','Italic','Strike'), array('Format'), array('Image','HorizontalRule'), array('NumberedList','BulletedList'), array('Link','Unlink'), array('Undo','Redo','RemoveFormat'), array('Preview'), array('Maximize'), array('MediaEmbed') ), 'extraPlugins' => 'MediaEmbed', 'contentsCss' => WEB_PATH.'assets/css/main.css', 'htmlEncodeOutput' => FALSE, 'entities' => FALSE, 'bodyClass' => 'ckeditor', 'toolbarCanCollapse' => FALSE, );
  • edited 1:05PM
    Thanks a lot for your quick reply, it really helped a lot.

    The weird thing now is the way ckeditor stores de information in the database. I followed the 'simple module' creation tutorial, and everyithing is fine. But when I try to store something in the content field using html tags,for example:

    the string that is stored in the database is:
    <iframe frameborder="0" height="225" src="" width="400"></iframe>

    The result of this is that in the view, the iframe is not rendered as an embeded video, but a single string.

    I checked it using the pages module, and this behaviour does not happen.

    Is there any different configuration that I am missing?

    thanks a lot,
  • edited 1:05PM
    Did the HTML above get cut out (you can use the code HTML tag)?

    Try adding the following to your MY_fuel_modules.php to the module name you are using:
    'sanitize_input' => array('template','php'),

    By default, it uses the xss_clean which may cause problems with iframes.
  • edited 1:05PM
    It worked!! Thanks a lot!
  • edited 1:05PM

    How can i add the sanitize input to the "Pages" admin module ? I am having the same issue above described.

    Thanks a lot!
  • I'd hazard a guess at ./config/MY_fuel_layouts.php but I've not tested it...
  • edited 1:05PM
    It's under your MY_fuel_modules.php for the particular simple modules' configuration. As an example, look at the fuel/modules/fuel/config/fuel_modules.php and the pages module's configuration.
  • edited 1:05PM

    I tried the above instructions to put to work the embed youtube iframe on CKeditor but the result is the same the iframe tag as string.

    Any additional idea? Thanks a lot!
  • edited 1:05PM
    This sounds like it is something CKEditor may be doing to the string:´t-read-media-embed-code

    You can try adding config settings in the fuel/application/config/editors.php $config['ckeditor']['default'].
Sign In or Register to comment.