Old modules and plugins

Note: This database has been replaced by the Moodle Plugins Directory.

Small Hack: Force the editor to show up in Safari and Chrome in Moodle 1.9

Type: Small Hack
Requires: Moodle 1.9
Status: Contributed
Maintainer(s): -

The HTML editor in Moodle 1.9 was developed at a time that it didn't work in Safari therefore the developers chose to disable it for anything that it didn't recognize as a supported browser. However, the editor works fine in current versions of Safari and Chrome. It only requires editing a couple of lines of code in two separate files. Here are the instructions:

Paul Thayer: Forcing the HTML Area editor to show up in Safari and Chrome: This will tell moodle to attempt to display the editor even though it thinks it doesn't "support" the browser.

can_use_html_editor function in file /lib/moodlelib.php
line 6519 } else {
line 6520 return 1;
line 6521 }

This will tell the HTML editor to use its 'Gecko' configuration for Safari and browsers that it identifies as "Mozilla < 1.3", for instance, Chrome.

HTMLArea.checkSupportedBrowser = function() in /lib/editor/htmlarea/htmlarea.php
line 2408 //alert("Mozilla < 1.3 Beta is not supported!\n" +
line 2409 // "I'll try though, but it might not work.");
line 2410 return 'HTMLArea.is_gecko';
line 2414 //return false;
line 2415 return 'HTMLArea.is_gecko';


Record added by Pall Thayer - Friday, 25 June 2010, 4:39 AM
Last modified - Monday, 28 June 2010, 8:58 AM