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:
@@ -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>
|
||||
|
||||
@@ -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
@@ -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) ? '' : '&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) ? '' : '&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) {
|
||||
|
||||
Reference in New Issue
Block a user