MDL-14741 - Make tinymce work with the front page description.

TODO: convert the front page description form so it uses formslib
This commit is contained in:
scyrma
2008-06-06 01:49:07 +00:00
parent d28548d5e4
commit 264ad12641
3 changed files with 19 additions and 18 deletions
+5 -1
View File
@@ -16,7 +16,11 @@
</td>
<td>
<?php print_textarea($usehtmleditor, 25, 60, 660, 200, "summary", $form->summary); ?>
<?php
print_textarea($usehtmleditor, 25, 60, 660, 200, 'summary', $form->summary, 0, false, 'summary');
print($htmlEditorObject->activateEditor('summary', 'summary'));
?>
</td>
</tr>
</table>
-4
View File
@@ -61,10 +61,6 @@
print_simple_box_start('center');
include('editsection.html');
print_simple_box_end();
if ($usehtmleditor) {
use_html_editor("summary");
}
print_footer($course);
?>
+14 -13
View File
@@ -4825,20 +4825,21 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
}
if ($usehtmleditor) {
if (!empty($courseid) and has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $courseid))) {
$httpsrequired = empty($HTTPSPAGEREQUIRED) ? '' : '&amp;httpsrequired=1';
// needed for course file area browsing in image insert plugin
$str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
$CFG->httpswwwroot .'/lib/editor/htmlarea/htmlarea.php?id='.$courseid.$httpsrequired.'"></script>'."\n" : '';
} else {
$httpsrequired = empty($HTTPSPAGEREQUIRED) ? '' : '?httpsrequired=1';
$str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
$CFG->httpswwwroot .'/lib/editor/htmlarea/htmlarea.php'.$httpsrequired.'"></script>'."\n" : '';
}
$str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
$CFG->httpswwwroot .'/lib/editor/htmlarea/lang/en.php"></script>'."\n" : '';
$scriptcount++;
// if (!empty($courseid) and has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $courseid))) {
// $httpsrequired = empty($HTTPSPAGEREQUIRED) ? '' : '&amp;httpsrequired=1';
// // needed for course file area browsing in image insert plugin
// $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
// $CFG->httpswwwroot .'/lib/editor/htmlarea/htmlarea.php?id='.$courseid.$httpsrequired.'"></script>'."\n" : '';
// } else {
// $httpsrequired = empty($HTTPSPAGEREQUIRED) ? '' : '?httpsrequired=1';
// $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
// $CFG->httpswwwroot .'/lib/editor/htmlarea/htmlarea.php'.$httpsrequired.'"></script>'."\n" : '';
// }
// $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
// $CFG->httpswwwroot .'/lib/editor/htmlarea/lang/en.php"></script>'."\n" : '';
// $scriptcount++;
if ($height) { // Usually with legacy calls
if ($rows < $minrows) {