Have a read of the neweditor_readme.txt in /lib/editor (path is good for 1.7 -> 1.9).
You could alter the line: this.height = "auto"; (line 124 in /lib/editor/htmlarea/htmlarea.php )
To this.height = "400px"; Or whatever start size you like. Note this will resize all instances of the editor.
If you just wanted to resize the height of the editor when editing a journal question you could change the value in /mod/journal/edit.html line 18:
<?php print_textarea($usehtmleditor, 20, 60, 630, 400, "text", $entry->text); ?>
To
<?php print_textarea($usehtmleditor, 30, 60, 630, 400, "text", $entry->text); ?>
Altering the height of the editor when creating a new journal entry is little more tricky. I've been away from Moodle for a year and it's changed an awful lot!
If you alter the line:
$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'));
TO
$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'), array('height'=>'640px'));
It will set the height in the object ( print_object($mform) to see) but appears to be overridden elsewhere, I need to keep digging a little more.
Sorry, thats in /mod/journal/mod_form.php
You could alter the line: this.height = "auto"; (line 124 in /lib/editor/htmlarea/htmlarea.php )
To this.height = "400px"; Or whatever start size you like. Note this will resize all instances of the editor.
If you just wanted to resize the height of the editor when editing a journal question you could change the value in /mod/journal/edit.html line 18:
<?php print_textarea($usehtmleditor, 20, 60, 630, 400, "text", $entry->text); ?>
To
<?php print_textarea($usehtmleditor, 30, 60, 630, 400, "text", $entry->text); ?>
Altering the height of the editor when creating a new journal entry is little more tricky. I've been away from Moodle for a year and it's changed an awful lot!
If you alter the line:
$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'));
TO
$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'), array('height'=>'640px'));
It will set the height in the object ( print_object($mform) to see) but appears to be overridden elsewhere, I need to keep digging a little more.
Sorry, thats in /mod/journal/mod_form.php
Yes I need to change the size when adding a new journal. I am glad it wasn't something real easy, I have looked all over the code. Please keep me informed if you find a way to make it larger.
I used the wrong property!
Instead of 'height'=>'value' use 'rows'=>value.
So the line would read:
$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'), array('rows'=>'xxx'));
xxx being the row count you want.
Instead of 'height'=>'value' use 'rows'=>value.
So the line would read:
$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'), array('rows'=>'xxx'));
xxx being the row count you want.
Thank you! Thank you! Thank you!
That worked perfectly. I really appreciate you taking the time to look into it.
That worked perfectly. I really appreciate you taking the time to look into it.
No sweat Will, my pleasure mate