]> git.mjollnir.org Git - moodle.git/commitdiff
Merged MDL-9556: HTML editor shortcut button should only appear when JS enabled
authorsam_marshall <sam_marshall>
Tue, 24 Apr 2007 11:59:17 +0000 (11:59 +0000)
committersam_marshall <sam_marshall>
Tue, 24 Apr 2007 11:59:17 +0000 (11:59 +0000)
lib/weblib.php

index 823c2220185405856a6ad68ec83e119ff7eebcbf..4d1749e5093d16c1514833b6d2866429c08a30a5 100644 (file)
@@ -3862,7 +3862,9 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
     $str .= '</textarea>'."\n";
 
        if ($usehtmleditor) {
-               $str .= editorshortcutshelpbutton();
+        // Show shortcuts button if HTML editor is in use, but only if JavaScript is enabled (MDL-9556)
+               $str .= '<script type="text/javascript">document.write(\''.
+            str_replace('\'','\\\'',editorshortcutshelpbutton()).'\'); </script>';
        }
 
     if ($return) {