Not sure if this is a bug or a feature request:
I have a custom content type with some textarea cck fields.
Nicedit is working fine on the 'body' field.
On all the CCK textareas, the config-links are visible (show HTML | admin configure editor | admin remove editor), BUT nicedit isn't showing up for these fields. When I follow the 'admin configure editor' link for a CCK textarea, the mesage at the top of the config page says: "Configuring field value on page node/add/fundtype."... but "value" is not the name of the CCK field (i'm guessing because CCKs show up as nested arrays in the node data model?)

Thanks for a nice plugin!

Comments

andjules’s picture

Ok, I think I'm smart enough to figure out where the problem (and solution) lie, but not smart enough to code it :-)

in the module's _nicedit_form_alter_textarea function, it tries to find the textarea #type in the form array, but I think it tries to identify it by it's parent. This works for something like 'body'; however, with CCK elements, their is a deeper nest, e.g the parent of the #type is field_myCCKelement['0']['value']. So to remember the CCK field's nicEdit settings, you need to go further up the array tree...

Not sure how to code that, but for CCK, the field element will key will always be the great-grandparent of the #type key.

andjules’s picture

ok, added this arround line 136

    elseif ((substr($element_key,0,6) == 'field_') && ($value['value']['#type'] == 'textarea')) {
      nicedit_process_textarea($form, $element_key);
      $attached = 1;	
    }

but it didn't work
maybe it has something to do with the jquery identification routine:
var textarea = $(this).parent().parent().find('textarea');
in nicedit-enable.js

hillaryneaf’s picture

subscribing... I have same problem.. nice edit will not work with multiple text fields created with CCK!