Index: wymeditor.module
===================================================================
--- wymeditor.module	(revision 72)
+++ wymeditor.module	(working copy)
@@ -16,7 +16,6 @@
 
   // Check if the form has an input format selection group
   $format_types = _wymeditor_input_format_alter($form);
-
   if ($key = array_search('WYMeditor', $format_types)) {
     $rids = array();
     $filename = array();
@@ -148,15 +147,17 @@
 
   if (is_array($form)) {
     foreach (element_children($form) as $key) {
-      if (is_array($form[$key]['format'])) {
+     if(is_array($form[$key]))
+     foreach ($form[$key] as $key2 => $value ) {
+      if (is_array($form[$key][$key2])) {
         // The common point for the filter system is the declaration of the function
         // 'filter_form_validate' on the '#validate' atribute of Form API
-        if (is_array($form[$key]['format']['#element_validate']) && in_array('filter_form_validate', $form[$key]['format']['#element_validate'])) {
-          $form[$key]['format']['#attributes'] = array('class' => 'filter-formats');
+        if (is_array($form[$key][$key2]['#element_validate']) && in_array('filter_form_validate', $form[$key][$key2]['#element_validate'])) {
+          $form[$key][$key2]['#attributes'] = array('class' => 'filter-formats');
           if (!$format_types) {
             $formats = array();
-            foreach ($form[$key]['format'] as $key => $e) {
-              if ($e['#type'] == 'radio' && $e['#parents'][0] == 'format') {
+            foreach ($form[$key][$key2] as $key => $e) {
+              if ($e['#type'] == 'radio' && $e['#parents'][0] == $key2) {
                 $formats[$key] = $e['#title'];
               }
             }
@@ -164,7 +165,7 @@
           }
         }
       }
-
+    }
       // This function is recursive to find all input formats groups
       _wymeditor_input_format_alter(&$form[$key]);
     }
