Lightbox2 and CKEditor in Drupal

Do you want to automatically enable Lightbox2 for your images added with CKEditor/FCKeditor? Look no further!

Automatically enable Lightbox2 for images added with CKEditor

  1. Go to admin/settings/lightbox2/automatic
  2. Click “custom class images”
  3. With “Source” enabled in CKEditor, add for example the classname “lightbox” in the textbox (or whatever name you prefer).
  4. Click “Save configuration”
  5. When adding an image to a page make sure to add an URL to the image both under the “Image info” tab BUT ALSO under the “Link” tab!
  6. Go to the “Advanced” tab and write “lightbox” (or whatever you called the classname above) in the “Stylesheet classes” box.
  7. Done. When clicking on the image it should now show up in a lightbox!