The textarea input type for template variables doesn’t display as (most probably) intended when I look at the code in [tt]
tmplvars.inc.php[/tt]. It says:
case "textarea": // handler for textarea boxes
case "rawtextarea": // non-htmlentity convertex textarea boxes
case "htmlarea": // handler for textarea boxes (deprecated)
case "richtext": // handler for textarea boxes
$field_html .= '<textarea id="tv'.$field_id.'" name="tv'.$field_id.'" cols="40" rows="15" onchange="documentDirty=true;" style="width:100%;">' . htmlspecialchars($field_value) .'</textarea>';
break;
Which indicates that this should be an input box of 15 rows in the manager. However, it shows the same size as a mini textarea with only 5 input rows (Firefox 3.5.6, modx 1.0.2). This is annoying, especially in YAMS where the textarea is used for the automatically generated TVs that hold your multilingual content. Too small to properly edit the stuff!
I solved it with the following hack:
case "textarea": // handler for textarea boxes
case "rawtextarea": // non-htmlentity convertex textarea boxes
$field_html .= '<textarea id="tv'.$field_id.'" name="tv'.$field_id.'" cols="40" rows="15" onchange="documentDirty=true;" style="width:100%;">' . htmlspecialchars($field_value) .'</textarea>';
break;
case "htmlarea": // handler for textarea boxes (deprecated)
case "richtext": // handler for textarea boxes
$field_html .= '<textarea id="tv'.$field_id.'" name="tv'.$field_id.'" cols="40" rows="15" onchange="documentDirty=true;" style="width:100%; height:400px;">' . htmlspecialchars($field_value) .'</textarea>';
break;
Now, the normal textareas remain as they were defined before, but the HTML and RichText areas get an additional [tt]height:400px[/tt] attached to their style. Works for me.
For future modx development I would suggest to associate a CSS style with these (and the remaining) input type elements in order to control this from a CSS file (and potentially even from within the manager or at least via ManagerManager) instead of hacking the code. Maybe that’s already addressed in Revolution, but if not it’s just an idea.