SWFObject Plugin for FCKeditor

Introduction

This is a dialog-based plugin to replace the default flash insertion in FCKeditor (using <embed>) with SWFObject 2 (with the dynamic publishing method, <script>)

Besides generating the code with SWFObject, the insertion dialog allows to set the allowscriptaccess, wmode and allowfullscreen Flash parameters, and the posibility to add any flashvars that you need.

Author:

Alfonso Martínez de Lizarrondo

Sponsored by:

InControl Solutions

Uritec

Version history:

  1. 1.0: 14/09/2008. Based on standard flash dialog.
  2. 1.1: 15/09/2008. Fixes, add flashvars editor, fullscreen, allowscriptaccess, wmode
  3. 1.2: 21/09/2008. Fixes for IE, added the swfobject_WrapperClass option. Included the FCKCommentsProcessor code. Change behavior according to the swfObjectPath value.
  4. 1.3: 26/09/2008. More fixes for IE. It should work also in FCKeditor 2.5.
  5. 1.4: 26/10/2008. Automatic parsing of embedding code pasted in the url field. Added the swfObject_FlashVersion and swfObject_ExpressInstall configuration options.
  6. 1.5: 26/11/2008. Use by default a library hosted by Google, so no extra steps required to install. Added CDATA coments for the generated script.
  7. 1.6: 06/08/2009. Updated the default linked library to SWFObject 2.2.

Get the latest version and/or updated info

Installation

1. Copying the files

Extract the contents of the zip in you plugins directory, so it ends up like this
Screenshot of installation

editor\
	...
	js\
	lang\
	plugins\
		...
		swfobject
			fckplugin.js
			readme.html
			dialog\
			docs\
			images\
			lang\
		...
	skins\

2. Adding it to FCKeditor

Now add in your fckconfig.js or custom js configuration file the following line: FCKConfig.Plugins.Add( 'swfobject', 'en,es') ;

3. Adding it to the toolbarset

This plugin replaces the default flash dialog, just use the normal 'Flash' button.

4. Configure the plugin

These are the possible config values:

All these values can be set in the fckconfig.js file, a custom js configuration file, or at the moment of the creation of the FCKeditor instance using any language.

5. Use it

Now empty the cache of your browser and reload the editor, the new Flash dialog will be shown.

Besides generating the code with SWFObject, the insertion dialog allows to set the allowscriptaccess, wmode and allowfullscreen Flash parameters, and the posibility to add any flashvars that you need.

Since version 1.4, pasting embedding code generated by external sites as YouTube <object width="425" height="344"> <param name="movie" value="http://www.youtube.com/v/nj2hewPBQh0&hl=es&fs=1"></param> <param name="allowFullScreen" value="true"></param> <embed src="http://www.youtube.com/v/nj2hewPBQh0&hl=es&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed> </object> does generate the proper code in FCKeditor

Final notes

If you find this plugin useful, consider making a donation so it can be further improved, any amount can help to keep the development running.

If you need some special feature for this plugin, or if you need any other kind of plugin for FCKeditor then contact me and we can discuss it

Disclaimers

FCKeditor is © FredCK.com

The SWFObject is Copyright © 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis