1

I am having confusion in installing lightbox plugin in CkEditor, I have follwed this link. I'd copied the "lightbox" pluginfolder to CKEditors "plugins" folder and in the CKEditor configuration file (config.js) I've added the code: config.extraPlugins = 'lightbox'; within CKEDITOR.editorConfig = function( config ) { }

I have set lightbox_plus.js script to the header of your page. BUT I am stuck at this point (Copy the "lightbox" rootfolder to a folder of your choice AND for using lightbox plus open lightbox_plus.js and set the path to lightbox folder to LightboxPlus_rootpath.) Rightnow I've copied this to my website root directory and I don't know what should I assign to LightboxPlus_rootpath. Any suggestions how to make it work?

Faisal
  • 1,907
  • 1
  • 22
  • 29

1 Answers1

1

Here are the updated steps that should help:

  1. Extract the archive (there should be two directories referred below as "A" and "B").

    A) ckeditor folder
    B) lightbox folder

  2. Copy the "lightbox" plugin folder that’s inside the (A) ckeditor/plugins folder to your website/app’s CKEditors "plugins" folder.

  3. Copy the (B) "lightbox" folder to a location of your choice (let’s say location X) in your app/website.

  4. In the CKEditor configuration file (config.js) add the following code: config.extraPlugins = 'lightbox';

  5. To use lightbox plus open the (B) lightbox folder from the (X) location and edit the lightbox_plus.js file.

  6. Update the below variable with proper folder path in your website for the (X) location folder. By default its set to includes/javascript/:

     var LightboxPlus_rootpath = 'includes/javascript/';
    
  7. Add a reference to the lightbox_plus.js file inside your page’s header. Below is an example reference for lightbox_plus.js in default location. Please update the src path according to the file’s location.

     <script type="text/javascript" src="includes/javascript/lightbox/lightbox_plus.js"></script>
    
Community
  • 1
  • 1
Wasif.Butt
  • 569
  • 5
  • 11
  • 1
    I've already followed the same steps, but after doing all this, when I click on image button in CkEditor, my screen stucks (become faded) – Faisal Feb 25 '14 at 11:48
  • 1
    Can you make sure that the lightbox image is inside a .box folder with the same name as the original image? e.g if you image is image.png the lightbox image for that should be image.png but inside a .box folder in the same directory. – Wasif.Butt Feb 25 '14 at 13:49
  • 1
    Sorry I am not getting exactly how to do that or what exactly you're trying to say, becuase I'd follwed all the steps as told. Can we Chat? – Faisal Feb 25 '14 at 16:51
  • 1
    sure let me know where to join. – Wasif.Butt Feb 26 '14 at 16:26