diff --git a/mod/resource/coursefiles.php b/mod/resource/coursefiles.php index c2538de42b1..36d905c4a91 100644 --- a/mod/resource/coursefiles.php +++ b/mod/resource/coursefiles.php @@ -332,21 +332,16 @@ fclose($fileptr); if (mimeinfo("type", $file) == "text/html") { - if ($usehtmleditor = can_use_richtext_editor()) { - $onsubmit = "onsubmit=\"copyrichtext(document.form.text);\""; - } else { - $onsubmit = ""; - } + $usehtmleditor = can_use_html_editor(); } else { $usehtmleditor = false; - $onsubmit = ""; } $usehtmleditor = false; // Always keep it off for now print_heading("$streditfile"); echo "
"; - echo "
"; + echo ""; echo " "; echo " "; echo " "; @@ -365,8 +360,8 @@ echo "
"; echo "
"; - if ($usehtmleditor) { - print_richedit_javascript("form", "text", "yes"); + if ($usehtmleditor) { + use_html_editor(); }