Image upload plugin does not appear if 2nd profile is active

omniverse - May 13, 2009 - 20:24
Project:YUI Rich Text Editor
Version:6.x-2.33
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

line 8 of img_upload.js needs to check for an undefined config variable on line 8
It will be undefined if the first editor in YAHOO.Drupal.editors is not being used.

function yui_editor_img_upload() {
for (var e in YAHOO.Drupal.editors) {
var myEditor = YAHOO.Drupal.editors[e].editor;
var config = YAHOO.Drupal.editors[e].config;

if ((config != undefined) && (config.img_upload == 1)) {
yui_img_uploader(myEditor, config.base_path + '?q=/yui_editor/image_upload', 'files[upload]', config.base_path, YAHOO.Drupal.editors[e].id);
}
}
}

 
 

Drupal is a registered trademark of Dries Buytaert.