From 4644313b7cb8d4710f85fe515f800ceff3a6c2f9 Mon Sep 17 00:00:00 2001 From: scyrma Date: Fri, 18 Jul 2008 04:24:53 +0000 Subject: [PATCH] MDL-14741: Make tinymce loading simpler, and makes it work on pages with multiple instances. --- lib/editor/tinymce.js.php | 8 ++++---- lib/weblib.php | 18 +++++------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/lib/editor/tinymce.js.php b/lib/editor/tinymce.js.php index a63feed85a..233ab4c578 100644 --- a/lib/editor/tinymce.js.php +++ b/lib/editor/tinymce.js.php @@ -148,7 +148,7 @@ EOF; echo <<httpswwwroot", @@ -162,7 +162,7 @@ echo <<httpswwwroot", @@ -195,9 +195,9 @@ EOF; readfile('tinymce/xhtml_ruleset.txt'); echo <<htmleditors)) { - $output .= "\n".''."\n"; - } - if ($return) { return $output; } else { @@ -4796,9 +4786,9 @@ function print_recent_activity_note($time, $user, $text, $link, $return=false, $ * @param int $courseid Course ID to pass to the file manager (defaults to global $COURSE->id). * @param bool $return If false, will output string. If true, will return string value. * @param string $id CSS ID to add to the textarea element. - * @param string $class CSS classes to add to the textarea element. Use 'form-textarea-simple' to get a basic editor. Defaults to 'form-textarea-advanced' (complete editor). + * @param string $editorclass CSS classes to add to the textarea element when using the htmleditor. Use 'form-textarea-simple' to get a basic editor. Defaults to 'form-textarea-advanced' (complete editor). If this is null or invalid, the htmleditor will not show for this field. */ -function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $value='', $courseid=0, $return=false, $id='', $class='form-textarea-advanced') { +function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $value='', $courseid=0, $return=false, $id='', $editorclass='form-textarea-advanced') { /// $width and height are legacy fields and no longer used as pixels like they used to be. /// However, you can set them to zero to override the mincols and minrows values below. @@ -4850,9 +4840,11 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v if ($usehtmleditor) { $THEME->htmleditors[] = $id; + } else { + $editorclass = ''; } - $str .= "\n".'