Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Moodle-specific customisations to the HTML editor: Difference between revisions

From MoodleDocs
Line 32: Line 32:


I don't yet know where these files lived before the move, so I can't look further back in history than this yet.
I don't yet know where these files lived before the move, so I can't look further back in history than this yet.
From the readme, the code is based on HTMLarea 3.0 beta.


* images/* (except for images/kbhelp.gif).
* images/* (except for images/kbhelp.gif).
* lang/en.js
* lang/en.js
* popups/about.html
* popups/blank.html
* popups/dialog.css
* popups/editor_help.html
* popups/
* popups/
* dialog.js
* htmlarea.css
* index.html (blank file)
* license.txt
* popupdiv.js
* popupwin.js (well there were some changes, but only to the language of some comments.)
* release-notes.html


===images/kbhelp.gif===
===images/kbhelp.gif===
Line 43: Line 58:


This is a Moodle-specific file to make HTML area use Moodle's internationalisation system, instead of the one built into HTMLarea.
This is a Moodle-specific file to make HTML area use Moodle's internationalisation system, instead of the one built into HTMLarea.
===plugins/GetHTML/get-html.js===
This plugin was added on 3rd June 2006 by Janne Mikkonen. One change since then, to fix [http://tracker.moodle.org/browse/MDL-6106 MDL-6106] by [http://moodle.org/user/view.php?id=12863&course=5 Petr Škoda].
===plugins/SpellChecker/*===
There are loads of files in here. I have not looked at them at all.
===plugins/TableOperations/*===
There are loads of files in here. I have not looked at them at all.
===popups/createanchor.php===
Bunch of bug fixes, including XHTML-strict.
===popups/dialog_ins_char.php===
Bunch of bug fixes, including XHTML-strict.
===popups/dialog_ins_smile.php===
Bunch of bug fixes, including XHTML-strict.
===popups/fullscreen.js===
Bunch of bug fixes.
===popups/insert_image_std.php===
Bunch of bug fixes, including XHTML-strict.
===popups/insert_image.php===
Bunch of bug fixes, including XHTML-strict.
===coursefiles.php===
Integration with course files, obviously Moodle specific.
===htmlarea_bak.php===
What a suspicious file name. Should this really be in CVS? Has had a few minor changes made. Is quite like htmlarea.php, but with quite a lots of changes too, according to diff.
===htmlarea.class.php===
Some minor changes for XHTML-strictness.
===htmlarea.php===
Loads of changes (we are up to revision 1.20), which I have not analysed yet.

Revision as of 18:43, 29 July 2007

In this forum thread I summarise the position we have got ourselves into with the HTML editor. Moodle uses a WYSYG HTML editor called HTML area, which is now discontinued. We really want to switch to one of three other choices, but before we can do so, we need to work out exactly which Moodle-specific customisations we have made to HTML area to integrate it with Moodle, so we can make the same customisations to whichever editor we adopt in its place.--Tim Hunt 12:57, 29 July 2007 (CDT)

Summarly of the customisations we already know about

  • Integrate the add image dialog with the Moodle course files area.
  • Accessibility changes in Moodle 1.8
  • Integration with Moodle's internationalisation system, instead of HTMLarea's one. Done via lang/en.php.

Three possible replacements

All three of these are widely used by other open source projects, are under active development, with a release since May 2007.

Of these, only TinyMCE currently claims to support Safari, although FCK is aiming at it, and give a good justification why it is not there yet: http://dev.fckeditor.net/wiki/Compatibility

TinyMCE

LGPL licensed

Xinha

When HTMLarea was discontinued, this project was set up to continue development. Approximately BSD licenced.

FCKeditor

GPL, LGPL or MPL tri-licence. I once talked to some people who had successfully got FCK editor working with moodle.

Detailed analysis of Moodle-specific changes from the CVS logs

Unmodified files

These were checked in to their current location (lib/editor/htmlarea) on 3rd April 2006 with the comment "Moving old editor to htmlarea folder." by Janne Mikkonen, who is the default assignee of editor bugs in the tracker.

I don't yet know where these files lived before the move, so I can't look further back in history than this yet.

From the readme, the code is based on HTMLarea 3.0 beta.

  • images/* (except for images/kbhelp.gif).
  • lang/en.js
  • popups/about.html
  • popups/blank.html
  • popups/dialog.css
  • popups/editor_help.html
  • popups/
  • popups/
  • dialog.js
  • htmlarea.css
  • index.html (blank file)
  • license.txt
  • popupdiv.js
  • popupwin.js (well there were some changes, but only to the language of some comments.)
  • release-notes.html

images/kbhelp.gif

Added 30th November 2006 by Vy-Shane Sin Fat with comment "New help button for keyboard shortcuts." - part of the Moodle 1.8 accessibility work.

lang/en.php

This is a Moodle-specific file to make HTML area use Moodle's internationalisation system, instead of the one built into HTMLarea.

plugins/GetHTML/get-html.js

This plugin was added on 3rd June 2006 by Janne Mikkonen. One change since then, to fix [https://tracker.moodle.org/browse/MDL-6106 MDL-6106] by Petr Škoda.

plugins/SpellChecker/*

There are loads of files in here. I have not looked at them at all.

plugins/TableOperations/*

There are loads of files in here. I have not looked at them at all.

popups/createanchor.php

Bunch of bug fixes, including XHTML-strict.

popups/dialog_ins_char.php

Bunch of bug fixes, including XHTML-strict.

popups/dialog_ins_smile.php

Bunch of bug fixes, including XHTML-strict.

popups/fullscreen.js

Bunch of bug fixes.

popups/insert_image_std.php

Bunch of bug fixes, including XHTML-strict.

popups/insert_image.php

Bunch of bug fixes, including XHTML-strict.

coursefiles.php

Integration with course files, obviously Moodle specific.

htmlarea_bak.php

What a suspicious file name. Should this really be in CVS? Has had a few minor changes made. Is quite like htmlarea.php, but with quite a lots of changes too, according to diff.

htmlarea.class.php

Some minor changes for XHTML-strictness.

htmlarea.php

Loads of changes (we are up to revision 1.20), which I have not analysed yet.