]> git.mjollnir.org Git - moodle.git/commitdiff
Some fixes for using the new editor
authormoodler <moodler>
Mon, 3 Nov 2003 16:12:59 +0000 (16:12 +0000)
committermoodler <moodler>
Mon, 3 Nov 2003 16:12:59 +0000 (16:12 +0000)
mod/journal/edit.html
mod/journal/edit.php

index deaaecf1df987a5309a3ce52f0a4bcb3371630f9..038c00a56e1470bc9db31060c604f96ac2215641 100644 (file)
@@ -1,4 +1,4 @@
-<FORM name="theform" method="post" <?php echo $onsubmit ?> action="edit.php">
+<form name="theform" method="post" action="edit.php">
 <table><tr>
     <td align=right>
     <font size="1">
@@ -18,7 +18,9 @@
     </td>
 </tr></table>
 
+<table><tr><td>
 <?php  print_textarea($usehtmleditor, 20, 60, 630, 400, "text", $entry->text); ?>
+</td></tr></table>
 
 <p align=center>
 <?PHP
 <input type="hidden" name=id value="<?php echo $cm->id ?>">
 <input type="submit" value="<?php  print_string("savechanges") ?>">
 <input type="reset" value="<?php  print_string("revert") ?>">
-</P>
+</p>
 </form>
 
-<?PHP 
-   if ($usehtmleditor) { 
-       print_richedit_javascript("theform", "text", "no");
-   }
-?>
 
index 2b7361d2a72444ed8317fd37f7a288d117dd08f9..3906bb764ccebfb48c9cacc89c472091123ac65a 100644 (file)
 
     if ($usehtmleditor = can_use_richtext_editor()) {
         $defaultformat = FORMAT_HTML;
-        $onsubmit = "onsubmit=\"copyrichtext(theform.text);\"";
     } else {
         $defaultformat = FORMAT_MOODLE;
-        $onsubmit = "";
     }
-
+    
     if (empty($entry)) {
         $entry->text = "";
         $entry->format = $defaultformat;
                   <A HREF=\"view.php?id=$cm->id\">$journal->name</A> -> $stredit", "theform.text",
                   "", true, "", navmenu($course, $cm));
 
-    echo "<CENTER>\n";
+    echo "<center>\n";
 
-    print_simple_box( text_to_html($journal->intro) , "center");
+    print_simple_box( format_text($journal->intro) , "center");
 
-    echo "<BR>";
+    echo "<br />";
 
        include("edit.html");
 
+    if ($usehtmleditor) {
+        use_html_editor();
+    }
+
     print_footer($course);
 
 ?>