MDL-23542 adding support for cols and rows in textarea editor, fixing lesson to use smaller text areas

This commit is contained in:
Petr Skoda
2010-07-28 13:23:51 +00:00
parent c1a22a6eff
commit cb2c196306
3 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -201,7 +201,10 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element {
/// print text area - TODO: add on-the-fly switching, size configuration, etc.
$editor->use_editor($id, $this->_options, $fpoptions);
$str .= '<div><textarea id="'.$id.'" name="'.$elname.'[text]" rows="15" cols="80">';
$rows = empty($this->_attributes['rows']) ? 15 : $this->_attributes['rows'];
$cols = empty($this->_attributes['cols']) ? 80 : $this->_attributes['cols'];
$str .= '<div><textarea id="'.$id.'" name="'.$elname.'[text]" rows="'.$rows.'" cols="'.$cols.'">';
$str .= s($text);
$str .= '</textarea></div>';