Backgrounds Plugin for CKEditor

Introduction

This is a plugin that creates a field to set a background image for tables and cells in CKEditor.

No new dialogs, commands or toolbar buttons are added, the fields are placed in the advanced tab of the Table dialog and the bottom of the Cell Properties dialog.

Author:

Alfonso Martínez de Lizarrondo

Sponsored by:

Igenti, Inc.

Version history:

  1. 1.0: 11-January-2011. First version.
  2. 1.1: 16-January-2011. Added localization for the field label without extra requests.
  3. 1.2: 19-March-2013. Compatibility with CKEditor 4 (translation) and an attempt to integrate with the upcoming ACF in 4.1.
  4. 1.3: 26-March-2013. Improved integration with ACF.
  5. 1.3.1: 19-July-2013. Protection in case one of the tabs have been removed. Thanks to Farhan.
  6. 1.4: 6-October-2013. Options to select the background position and repeat based on the initial proposal by OFark and patch by lazyhammer. There are still at least two issues related to these combos (#2 & #3)
  7. 1.5: 9-March-2014. Support for background attachment in tables and cells and background color for tables based on the changes by HonTung
    Adjusted compatibity for the changes in CKEditor that pass the array of selected cells to the "setup" function.

Check for latest version and other CKEditor plugins

Installation

1. Copying the files

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

ckeditor\
	...
	images\
	lang\
	plugins\
		...
		backgrounds\
			plugin.js
			readme.html
			docs\
		...
	skins\
	themes\

2. Adding it to CKEditor

Now add the plugin in your config.js or custom js configuration file: config.extraPlugins='backgrounds';

3. Use it

Now empty the cache of your browser and reload the editor, field will show up in the Table an Cell dialogs. If you have enabled the file browser (for the images dialog for example) then the Browse server button will show up.

Disclaimers

CKEditor is © CKSource.com