Squirrelmail: increase the size of compose textarea - How to
By default, squirrelmail's compose page contains a small textarea to write the body of your email. Here is how to increase it's height or size (number of columns):
First, open the
src/compose.php file with your favourite editor and search for
textarea:
Code:
if ($compose_new_win == '1') {
echo ' <tr >' . "\n" .
' <td bgcolor="' . $color[0] . '" colspan="2" align="center">' . "\n" .
' <textarea name="body" id="body" rows="' . (int)$editor_height .
'" cols="' . (int)$editor_size . '" wrap="virtual"' . $onfocus . '>';
}
else {
echo ' <tr >' . "\n" .
' <td bgcolor="' . $color[4] . '" colspan="2">' . "\n" .
' <textarea name="body" id="body" rows="' . (int)$editor_height .
'" cols="' . (int)$editor_size . '" wrap="virtual"' . $onfocus . '>';
}
The height (
rows attribute of textarea html tag) and size (
cols attribute of the textarea html tag) are given by two parameters:
$editor_height and
$editor_size.
Now, we open thee
include/load_prefs.php file and search for these two lines (usually row 144 and 145 inside the file):
Code:
$editor_size = getPref($data_dir, $username, 'editor_size', 150 );
$editor_height = getPref($data_dir, $username, 'editor_height', 20 );
You can now edit the last fields inside the
getPref function and change (in my case) 150 and 20 with your preference. Then save and re-open the
compose page in Squirrelmail.
Make sure not to set them too high.