HTML Editor and Safari Browser (Mac)

HTML Editor and Safari Browser (Mac)

by David Dickerson -
Number of replies: 17
Hi, everyone.

I am running Mac OS X 10.4.3 ("Tiger"). I have Firefox installed as my default Web browser, and I am currently using the most current version, 1.5.

I am having trouble setting the background color to white using the Moodle HTML Editor with Firefox, so I tried using Safari (Version 2.0.2 [416.13]).

For the benefit of Mac OS X users who may not have tried Safari with Moodle, the Moodle HTML Editor does not even appear in Safari. When I click on the edit icon, I simply get a window showing the source code.

If you have successfully used the Moodle HTML Editor with Safari, please let me know.

Otherwise, please accept this message as an indication that Safari, at least the current version, is not compatible with Moodle's HTML Editor.

I hope that this message is of help to someone. Thank you for your time!

Cordially,

David
--
<http://ddickerson.igc.org/>
<http://www.us.iearn.org/>
Average of ratings: -
In reply to David Dickerson

Re: HTML Editor and Safari Browser (Mac)

by Tim Allen -
Hi,

This is not news, the HTML Editor does not work on all browsers.  I know it works on IE, Mozilla, Firefox and Netscape.  It doesn't work on Safari , Opera and probably most others, but I don't know the definitive list. 

HTHsmile
Tim.
In reply to Tim Allen

Re: HTML Editor and Safari Browser (Mac)

by David Dickerson -
Hi, Tim.

Thanks.

From my understanding, Safari on Mac OS X uses the same engine as the KDE/Linux browser Konqueror, so I assume that the HTML Editor does not appear in Konqueror either. (My Linux and Windows PC is not up right now, so I cannot check.)

Firefox is my default browser on Mac OS X, so I am okay. I had not bothered to check for the HTML Editor with Safari until yesterday.

Cordially,

David
In reply to David Dickerson

Re: HTML Editor and Safari Browser (Mac)

by Steve Garcia -
Are you successfully using Firefox 1.5 with the HTML editor?
In reply to Steve Garcia

Re: HTML Editor and Safari Browser (Mac)

by Tim Allen -
Sure, I'm typing in it right now!  If you can't see it, make sure you have enabled the HTML editor in your personal profile settings.

Tim.
In reply to Tim Allen

Re: HTML Editor and Safari Browser (Mac)

by Steve Garcia -
I had to drop back to Firefox 1.0.7 because 1.5 had some serious problems with the HTML editor. The expanded window was unavailable -- it would pop up but it would pop up as a blank window.

There were some posts about this problem, but I hadn't heard that they had been fixed. I'm not running a Mac, so I suppose this could be the difference.

What version of Moodle are you running?
In reply to Steve Garcia

Re: HTML Editor and Safari Browser (Mac)

by Tim Allen -
I'm using Windows too.  Moodle 1.5.3+ latest.

The expanded window was unavailable -- it would pop up but it would pop up as a blank window.

Oh, this is a known bug.  I just meant that apart from that bug everything else is working fine.  I don't use the expanded window much so it is not much of an issue for me.

Tim.  smile

In reply to Tim Allen

Re: HTML Editor and Safari Browser (Mac)

by Steve Garcia -
The expanded window is the only reason I have the HTML editor enabled. Before I noticed it I just used the bare textarea -- I find it easier to edit the html directly anyway, but having a resizable window to do it in is great.
In reply to David Dickerson

Re: HTML Editor and Safari Browser (Mac)

by Ken Tuley -
so is this something that we need to report to Apple..... to get them to fix Safari so it works with Moodle's HTML editor?

Or is there some other way to make this work?

I use Safari for everything, and would like to use the HTML editor within Safair, rather than firefox.

In reply to Tim Allen

Re: HTML Editor and Safari Browser (Mac)

by Shaun Daubney -
i can confirm the browser on the PSP doesn't like it either. An editor that works with Safari would be most welcome btw.
In reply to Shaun Daubney

Re: HTML Editor and Safari Browser (Mac)

by Mauno Korpelainen -

We have already several choices available and soon in moodle too. Check

http://moodle.org/mod/forum/discuss.php?d=96160

TinyMCE, FCKEditor, Xinha, YUIRTE and a couple of other editor work with the latest versions of Safari and Opera. I have used this function in moodlelib.php to allow those browsers to use editor:

function can_use_html_editor() {
    global $USER, $CFG;

    if (!empty($USER->htmleditor) and !empty($CFG->htmleditor)) {
        if ( isset( $_SERVER ) ) {
  $sAgent = $_SERVER['HTTP_USER_AGENT'] ;
 }
 else {
  global $HTTP_SERVER_VARS ;
  if ( isset( $HTTP_SERVER_VARS ) ) {
   $sAgent = $HTTP_SERVER_VARS['HTTP_USER_AGENT'] ;
  }
  else {
   global $HTTP_USER_AGENT ;
   $sAgent = $HTTP_USER_AGENT ;
  }
 }

 if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
 {
  $iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
  return ($iVersion >= 5.5) ;
 }
 else if ( strpos($sAgent, 'Gecko/') !== false )
 {
  $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
  return ($iVersion >= 20030210) ;
 }
 else if ( strpos($sAgent, 'Opera/') !== false )
 {
  $fVersion = (float)substr($sAgent, strpos($sAgent, 'Opera/') + 6, 4) ;
  return ($fVersion >= 9.5) ;
 }
 else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) )
 {
  $iVersion = $matches[1] ;
  return ( $matches[1] >= 522 ) ;
 }
 
    }
    else return false ;
}

In reply to David Dickerson

Re: HTML Editor and Safari Browser (Mac)

by Mark Malone -
The nightly builds of the webkit engine used by Safari is available from http://nightly.webkit.org. Has anyone tried it with moodle's RTE implementation? My gut tells me that there's a lot of browser sniffing going on that will need to be altered before it's perfect but all the compatibility work on the browser side should be complete.

-Mark
In reply to Mark Malone

Re: HTML Editor and Safari Browser (Mac)

by Larry Elchuck -
If I understood Martin D properly at the Canadian Moodlemoot last week, HTMLarea has been disabled for Safari and other Konqueror-based engines. So using the latest nightly build of the webqit engine would not do it alone.

Some other tweaking of the code would need to be done within Moodle ... probably in htmlarea.php in the mid-2300 line area.

larry
In reply to Larry Elchuck

Re: HTML Editor and Safari Browser

by Larry Elchuck -
Now that Safari 3.0 is out in beta form for both the Mac and PC, it would be great to have an html editor that works with this browser. It certainly will increase it's marketshare.

Maybe issues in previous versions of Safari have been resolved with the default htmleditor.

Does anyone know?

larry
In reply to Larry Elchuck

Re: HTML Editor and Safari Browser (Mac)

by Cristian Alvarado -
Bumping this thread, mostly because Safari not working seems to be a major bug. I'll run some tests on my local installation to see if the Safari beta can support the HTMLArea once it's enabled.

Safari is the default browser on Mac, and I know a lot of people are not savvy enough to know how to install Firefox on their machines (I work support for my campus, and we have users who think the Internet is "the blue E icon"). If moodle doesn't work the the default browser for a system, then I think it's a big issue.
In reply to Cristian Alvarado

Re: HTML Editor and Safari Browser (Mac)

by Mauno Korpelainen -

The latest TinyMCE editor seems to work with Safari and Opera too http://www.geniisoft.com/showcase.nsf/WebEditors

I have not yet tested how to get the latest version of TinyMCE to work with moodle 1.8...

In reply to Mauno Korpelainen

Re: HTML Editor and Safari Browser (Mac)

by Jacob Johnson -
I have the latest version of TinyMCE working on 1.8

My problem, however, is with moodle's browser sniffing...

I know that TinyMCE works in safari, yet moodle prevents TinyMCE from loading within Safari.

Does anybody know how to disable moodle's browser sniffing for Safari?

Thanks!