diff --git a/lib/editor/htmlarea/htmlarea.php b/lib/editor/htmlarea/htmlarea.php
index 6cdcb809958..f7942b616a5 100644
--- a/lib/editor/htmlarea/htmlarea.php
+++ b/lib/editor/htmlarea/htmlarea.php
@@ -2371,6 +2371,7 @@ HTMLArea.is_mac_ie = (HTMLArea.is_ie && HTMLArea.is_mac);
HTMLArea.is_win_ie = (HTMLArea.is_ie && !HTMLArea.is_mac);
HTMLArea.is_gecko = (navigator.product == "Gecko");
HTMLArea.is_safari = (HTMLArea.agt.indexOf("safari") != -1);
+HTMLArea.is_webkit = (HTMLArea.agt.indexOf("applewebkit") != -1); // eg: chrome
// variable used to pass the object to the popup editor window.
HTMLArea._object = null;
@@ -2398,6 +2399,9 @@ HTMLArea.cloneObject = function(obj) {
// FIXME!!! this should return false for IE < 5.5
HTMLArea.checkSupportedBrowser = function() {
+ if (HTMLArea.is_webkit) {
+ return true;
+ }
if (HTMLArea.is_gecko) {
if (navigator.productSub < 20021201) {
alert("You need at least Mozilla-1.3 Alpha.\n" +
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index 63943db00a1..8c17deb013b 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -6528,6 +6528,8 @@ function can_use_html_editor() {
return 'MSIE';
} else if (check_browser_version('Gecko', 20030516)) {
return 'Gecko';
+ } else if (check_browser_version('Safari', 531)) {
+ return 'AppleWebKit';
}
}
return false;