CKEditor SWF version 6.x-2.0 introduces FLV and MP3 media files easy embedding.

This module is an extension to the CKEditor module.

It also supports CKEditor installed through the Wysiwyg module.

It seriously enhances CKEditor's outdated Flash plugin:
with CKEditor SWF, inserting a SWF animation, a FLV video or a MP3 audio file becomes as easy as inserting an image file: just pick up a SWF, FLV or MP3 file from IMCE (or CKFinder) and that's it!

It is composed of 2 parts:

  1. A client-side CKEditor plugin that adds many features and fixes to CKEditor's default Flash plugin:
    • Allows SWF animation, FLV video and MP3 audio files easy embedding
    • Retrieves width and height from the SWF or the FLV file
    • Adds a lock/unlock button to maintain aspect ratio while changing width or height
    • Adds a button to reset width/height to the SWF file's default dimensions
    • Allows width/height percentage values
    • Adds a textfield in Properties tab to edit the base parameter
    • Adds a Flashvars tab to edit the flashvars parameter
    • Displays a real preview
    • Fixes various bugs of the default plugin
    • New (experimental, in dev)! Allows to directly paste a YouTube video URL into CKEditor SWF to embed it!
  2. A server-side input format filter that converts the Flash embedding markup generated by CKEditor into a standards compliant one:
    By default, CKEditor generates a <object><embed></embed></object> markup, which is not standards compliant.
    CKEditor SWF Filter converts it into the correct <object><object></object></object> markup.

    If you prefer, CKEditor SWF Filter can also use the SWFObject JavaScript library to embed the Flash content.

Requirements and Compatibility

Currently, CKEditor SWF needs the following to run:

  • the CKEditor module, version 6.x-1.0 or above or the Wysiwyg module, version 6.x-2.1 or above
  • the CKEditor editor, version 3.1 or above
  • the GD2 PHP library
  • the getID3() module is needed if you want FLV and MP3 files support.

CKEditor SWF does not support file names containing spaces, so it is highly recommended that you install the Transliteration module to ensure that your uploaded file names are sanitized.

CKEditor SWF has been tested successfully on the following internet browsers:

  • Firefox 3.5
  • Internet Explorer 7 and 8
  • Safari 4


Copy the ckeditor_swf folder to your sites/all/modules directory.
Navigate to admin/build/modules and enable the module.

When using the CKEditor module

Navigate to admin/settings/ckeditor and edit the desired profile.

Under Editor appearance > Plugins, check the CKEditor SWF box.

Save changes.
Clear your browser's cache.

When using the Wysiwyg module

Navigate to admin/settings/wysiwyg and edit CKEditor profile (click on the Edit button next to the input format CKEditor is assigned to).

Under Buttons and plugins, check both Flash and CKEditor SWF boxes.

Save changes.
Clear your browser's cache.

Setting up CKEditor SWF Filter

Go to admin/settings/filters and choose the input format where you want to add the filter (click on the configure link next to this input format).

Check the CKEditor SWF Filter checkbox and save settings.

Click again on the same input format's configure button, then this time, click on the Rearrange tab.

Drag and drop CKEditor SWF Filter to the bottom of the list.

Save changes.

Notice: if the input format uses HTML Filter too, make sure it allows the <object> and <param> tags.

Using SWFObject

If you prefer that CKEditor SWF Filter uses SWFObject instead of the default markup to embed Flash content, click again on the same input format's configure button, then this time, click on the Configure tab.

Under CKEditor SWF Filter, follow the online instructions.

Save configuration.

Setting up support for FLV and MP3 files easy embedding

Install the getID3() module and configure it properly.

Navigate to admin/settings/ckeditor_swf and follow the online instructions.

Notice: you should be able to configure any other player to work with CKEditor SWF but that is beyond the scope of these instructions. Further documentation about this part should be added soon.

Updating from any version below 6.x-2.1

Visit update.php

If you were using CKEditor SWF 6.x-2.0-beta-x, you may have added some players configuration to CKEditor module's ckeditor.config.js file.
Please remove the Drupal.settings.ckeditor_swf.players = { ... }; part and follow the installation instructions above: players configuration must now be added from the admin/settings/ckeditor_swf administration page.

Clear your browser's cache.

Next features to come

  • Provide an easy way to embed FLV and MP3 medias done
  • Add support for the swfobject javascript library done
  • Provide a more user-friendly administration form
  • Add support for alternative text
  • Fix plugin minor accessibility issues
  • Clean up/optimize plugin code

Related modules

Check out the CKEditor Link module that allows to easily create links to Drupal nodes through CKEditor!


This module is sponsored by Absyx.

If you like this module, please review Absyx.

Project information