Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.428
diff -u -r1.428 common.inc
--- includes/common.inc	3 Mar 2005 20:13:20 -0000	1.428
+++ includes/common.inc	5 Mar 2005 09:11:06 -0000
@@ -1274,7 +1274,25 @@
     }
   }
 
-  $output .= theme('form_element', $title, '<textarea wrap="virtual"'. $cols .' rows="'. $rows .'" name="edit['. $name .']" id="edit-'. $name .'" class="'. _form_get_class('textarea', $required, _form_get_error($name)) .'"'. drupal_attributes($attributes) .'>'. check_form($value) .'</textarea>', $description, 'edit-'. $name, $required, _form_get_error($name));
+  // e.g. optionally plug in WYSIWYG editor html between title and textarea
+  foreach (module_list() as $module_name) {
+    if (module_hook($module_name, 'textarea')) {
+      $form_element .= module_invoke($module_name, 'textarea', 'post-title', $name);
+    }
+  }
+
+  // e.g. optionally plug in WYSIWYG editor additional attributes for the textarea
+  foreach (module_list() as $module_name) {
+    if (module_hook($module_name, 'textarea')) {
+      if ($module_attributes = module_invoke($module_name, 'textarea', 'attributes', $name)) {
+        $attributes = array_merge($attributes, $module_attributes);
+      }
+    }
+  }
+
+  $form_element .= '<textarea wrap="virtual"'. $cols .' rows="'. $rows .'" name="edit['. $name .']" id="edit-'. $name .'" class="'. _form_get_class('textarea', $required, _form_get_error($name)) .'"'. drupal_attributes($attributes) .'>'. check_form($value) .'</textarea>';
+
+  $output .= theme('form_element', $title, $form_element, $description, 'edit-'. $name, $required, _form_get_error($name));
 
   // e.g. optionally plug in a WYSIWYG editor
   foreach (module_list() as $module_name) {
