### Eclipse Workspace Patch 1.0
#P kmw
diff --git sites/all/modules/wysiwyg/editors/ckeditor.inc sites/all/modules/wysiwyg/editors/ckeditor.inc
index 95a4ce4..386803a 100644
--- sites/all/modules/wysiwyg/editors/ckeditor.inc
+++ sites/all/modules/wysiwyg/editors/ckeditor.inc
@@ -219,11 +219,13 @@
     // Needed to make relative paths work in the editor.
     'baseHref' => $GLOBALS['base_url'] . '/',
     'width' => 'auto',
     // For better compatibility with smaller textareas.
     'resize_minWidth' => 450,
-    'height' => 420,
+    // Rough estimate of editor height in pixels:
+    // 40 for the toolbar, 29 for the first row, and 15 for the rest.
+    'height' => isset($config['rows']) ? 40 + 29 + 15 * ($config['rows'] - 1) : 400,
     // @todo Do not use skins as themes and add separate skin handling.
     'theme' => 'default',
     'skin' => !empty($theme) ? $theme : $default_skin,
     // By default, CKEditor converts most characters into HTML entities. Since
     // it does not support a custom definition, but Drupal supports Unicode, we
diff --git sites/all/modules/wysiwyg/editors/fckeditor.inc sites/all/modules/wysiwyg/editors/fckeditor.inc
index fba81f6..2ad4c67 100644
--- sites/all/modules/wysiwyg/editors/fckeditor.inc
+++ sites/all/modules/wysiwyg/editors/fckeditor.inc
@@ -100,11 +100,13 @@
   $settings = array(
     'EditorPath' => base_path() . $editor['library path'] . '/',
     'SkinPath' => base_path() . $editor['library path'] . '/editor/skins/' . $theme . '/',
     'CustomConfigurationsPath' => base_path() . drupal_get_path('module', 'wysiwyg') . '/editors/js/fckeditor.config.js',
     'Width' => '100%',
-    'Height' => 420,
+    // Rough estimate of editor height in pixels:
+    // 40 for the toolbar, 29 for the first row, and 15 for the rest.
+    'Height' => isset($config['rows']) ? 40 + 29 + 15 * ($config['rows'] - 1) : 400,
     'LinkBrowser' => FALSE,
     'LinkUpload' => FALSE,
     'ImageBrowser' => FALSE,
     'ImageUpload' => FALSE,
     'FlashBrowser' => FALSE,
diff --git sites/all/modules/wysiwyg/editors/js/fckeditor-2.6.js sites/all/modules/wysiwyg/editors/js/fckeditor-2.6.js
index fd915e3..9b77237 100644
--- sites/all/modules/wysiwyg/editors/js/fckeditor-2.6.js
+++ sites/all/modules/wysiwyg/editors/js/fckeditor-2.6.js
@@ -6,10 +6,11 @@
 Drupal.wysiwyg.editor.attach.fckeditor = function(context, params, settings) {
   var FCKinstance = new FCKeditor(params.field, settings.Width, settings.Height, settings.ToolbarSet);
   // Apply editor instance settings.
   FCKinstance.BasePath = settings.EditorPath;
   FCKinstance.Config.wysiwygFormat = params.format;
+  FCKinstance.Config.wysiwygField = params.field;
   FCKinstance.Config.CustomConfigurationsPath = settings.CustomConfigurationsPath;
 
   // Load Drupal plugins and apply format specific settings.
   // @see fckeditor.config.js
   // @see Drupal.wysiwyg.editor.instance.fckeditor.init()
diff --git sites/all/modules/wysiwyg/editors/js/fckeditor.config.js sites/all/modules/wysiwyg/editors/js/fckeditor.config.js
index d441055..82759e9 100644
--- sites/all/modules/wysiwyg/editors/js/fckeditor.config.js
+++ sites/all/modules/wysiwyg/editors/js/fckeditor.config.js
@@ -7,11 +7,12 @@
  * FCKeditor does not support to pass complex variable types to the editor.
  * Instance settings passed to FCKinstance.Config are temporarily stored in
  * FCKConfig.PageConfig.
  */
 var wysiwygFormat = FCKConfig.PageConfig.wysiwygFormat;
-var wysiwygSettings = Drupal.settings.wysiwyg.configs.fckeditor[wysiwygFormat];
+var wysiwygField = FCKConfig.PageConfig.wysiwygField;
+var wysiwygSettings = Drupal.settings.wysiwyg.configs.fckeditor[wysiwygFormat][wysiwygField];
 var pluginSettings = (Drupal.settings.wysiwyg.plugins[wysiwygFormat] ? Drupal.settings.wysiwyg.plugins[wysiwygFormat] : { 'native': {}, 'drupal': {} });
 
 /**
  * Apply format-specific settings.
  */
diff --git sites/all/modules/wysiwyg/editors/tinymce.inc sites/all/modules/wysiwyg/editors/tinymce.inc
index dc0ea5c..7a33c5d 100644
--- sites/all/modules/wysiwyg/editors/tinymce.inc
+++ sites/all/modules/wysiwyg/editors/tinymce.inc
@@ -180,10 +180,13 @@
     'document_base_url' => base_path(),
     'mode' => 'none',
     'plugins' => array(),
     'theme' => $theme,
     'width' => '100%',
+    // Rough estimate of editor height in pixels:
+    // 40 for the toolbar, 29 for the first row, and 15 for the rest.
+    'height' => isset($config['rows']) ? 40 + 29 + 15 * ($config['rows'] - 1) : 400,
     // Strict loading mode must be enabled; otherwise TinyMCE would use
     // document.write() in IE and Chrome.
     'strict_loading_mode' => TRUE,
     // TinyMCE's URL conversion magic breaks Drupal modules that use a special
     // syntax for paths. This makes 'relative_urls' obsolete.
diff --git sites/all/modules/wysiwyg/wysiwyg.js sites/all/modules/wysiwyg/wysiwyg.js
index 7380d52..264a6c5 100644
--- sites/all/modules/wysiwyg/wysiwyg.js
+++ sites/all/modules/wysiwyg/wysiwyg.js
@@ -111,11 +111,11 @@
     else {
       $('#wysiwyg-toggle-' + params.field).hide();
     }
     // Attach editor, if enabled by default or last state was enabled.
     if (params.status) {
-      Drupal.wysiwyg.editor.attach[params.editor](context, params, (Drupal.settings.wysiwyg.configs[params.editor] ? jQuery.extend(true, {}, Drupal.settings.wysiwyg.configs[params.editor][params.format]) : {}));
+      Drupal.wysiwyg.editor.attach[params.editor](context, params, (Drupal.settings.wysiwyg.configs[params.editor] ? jQuery.extend(true, {}, Drupal.settings.wysiwyg.configs[params.editor][params.format][params.field]) : {}));
     }
     // Otherwise, attach default behaviors.
     else {
       Drupal.wysiwyg.editor.attach.none(context, params);
       Drupal.wysiwyg.instances[params.field].editor = 'none';
diff --git sites/all/modules/wysiwyg/wysiwyg.module sites/all/modules/wysiwyg/wysiwyg.module
index 0a97e82..cac9ab0 100644
--- sites/all/modules/wysiwyg/wysiwyg.module
+++ sites/all/modules/wysiwyg/wysiwyg.module
@@ -192,15 +192,22 @@
               if (isset($profile->settings['show_toggle'])) {
                 $toggle = (int) $profile->settings['show_toggle'];
               }
               // Check editor theme (and reset it if not/no longer available).
               $theme = wysiwyg_get_editor_themes($profile, (isset($profile->settings['theme']) ? $profile->settings['theme'] : ''));
+              
+              if (!empty($field['#rows'])) {
+                $profile->settings['rows'] = $field['#rows'];
+              }
+              elseif ($field['#type'] == 'textfield') {
+                $profile->settings['rows'] = 1;
+              }
 
               // Add plugin settings (first) for this input format.
               wysiwyg_add_plugin_settings($profile);
               // Add profile settings for this input format.
-              wysiwyg_add_editor_settings($profile, $theme);
+              wysiwyg_add_editor_settings($field, $profile, $theme);
             }
 
             // Use a prefix/suffix for a single input format, or attach to input
             // format selector radio buttons.
             if (isset($element['format']['guidelines'])) {
@@ -382,25 +389,19 @@
 
   return $loaded[$name];
 }
 
 /**
- * Add editor settings for a given input format.
+ * Add editor settings for a given field and input format.
  */
-function wysiwyg_add_editor_settings($profile, $theme) {
-  static $formats = array();
-
-  if (!isset($formats[$profile->format])) {
-    $config = wysiwyg_get_editor_config($profile, $theme);
-    // drupal_to_js() does not properly convert numeric array keys, so we need
-    // to use a string instead of the format id.
-    if ($config) {
-      drupal_add_js(array('wysiwyg' => array('configs' => array($profile->editor => array('format' . $profile->format => $config)))), 'setting');
-    }
-    $formats[$profile->format] = TRUE;
-  }
-}
+function wysiwyg_add_editor_settings($field, $profile, $theme) {
+  $config = wysiwyg_get_editor_config($profile, $theme);
+  // drupal_to_js() does not properly convert numeric array keys, so we need
+  // to use a string instead of the format id.
+ 
+  drupal_add_js(array('wysiwyg' => array('configs' => array($profile->editor => array('format' . $profile->format => array($field['#id'] => $config))))), 'setting');
+ }
 
 /**
  * Add settings for external plugins.
  *
  * Plugins can be used in multiple profiles, but not necessarily in all. Because