From: vyshane Date: Thu, 30 Nov 2006 08:30:46 +0000 (+0000) Subject: Added help button for html editor shortcut keys. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fb08106cfe689274907e70df6ad50c6a22e928f0;p=moodle.git Added help button for html editor shortcut keys. --- diff --git a/lib/weblib.php b/lib/weblib.php index ec0724c640..38f882873b 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3635,6 +3635,10 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v } $str .= ''."\n"; + if ($usehtmleditor) { + $str .= editorshortcutshelpbutton(); + } + if ($return) { return $str; } @@ -4571,7 +4575,7 @@ function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext= $linkobject .= $imagetext; } else { $linkobject .= ''.$tooltip.''; + $CFG->pixpath .'/help.gif" />'; } } else { $linkobject .= $tooltip; @@ -4616,6 +4620,21 @@ function emoticonhelpbutton($form, $field) { helpbutton('emoticons', get_string('helpemoticons'), 'moodle', true, true, '', false, $imagetext); } +/** + * Print a help button. + * + * Prints a special help button for html editors (htmlarea in this case) + * @uses $CFG + */ +function editorshortcutshelpbutton() { + + global $CFG; + $imagetext = ''.
+					get_string('editorshortcutkeys').''; + + return helpbutton('editorshortcuts', get_string('editorshortcutkeys'), 'moodle', true, false, '', true, $imagetext); +} + /** * Print a message and exit. *