Source: http://drupal.org/node/249684#comment-877549, posted by StephaneC.


Hi,

i tested the Image Assist Integration within FCKEditor using the following configuration :
Drupal 6.2
FCKeditor 6.x-1.x-dev
Image 6.x-1.0-alpha1
Image assist 6.x-1.0-beta1

When i clicked on the "add image button", i got a blank frame.
After debugging, i found that the following code, on top of the img_assist_fckeditor.js, did not work :
document.write('

');

I replaced it by the following code (see attached file) :
//
// Load the img_assist_textarea.js script
//
// Get the header of the document
var head= document.getElementsByTagName('head')[0];
// Create a new script object
var script= document.createElement('script');
script.type= 'text/javascript';
// Source dirname is built from the second script tag found in the document
script.src = head.getElementsByTagName('script')[1].src.match( /.*\// ) + 'img_assist_textarea.js';
// Append the new script to the header
head.appendChild(script);

and now Image Assist works perfectly within FCKEditor (i have tested the previous code on Firefox 2 and IE6).

Regards,

Stephane

Comments

wwalc’s picture

Status: Active » Fixed

Works like a charm with this patch.

wwalc’s picture

Category: feature » bug

(It was a bug.)

Ryanbach’s picture

Status: Fixed » Reviewed & tested by the community

Has this patch been committed to the repository yet?

wwalc’s picture

Status: Reviewed & tested by the community » Fixed

Yes, it is available as 6.x-1.x-dev. Because this issue has been reported only for 6.x-1.x, it has been comitted only to the DRUPAL-6--1 branch.
If you experienced similar issues in Drupal 5, feel free to reopen this ticket and let me know what's your configuration (and OS/browser).

wwalc’s picture

To clear out any confusions, at this moment development takes place in branches DRUPAL-5--2 and DRUPAL-6--1.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.