Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: HTML editor 2.0.

Development:HTML editor 2.0: Difference between revisions

From MoodleDocs
No edit summary
Line 17: Line 17:
* Image uploading
* Image uploading
* Mathematical formulas/equation editing
* Mathematical formulas/equation editing
* Possible to turn it on and off on demand (on the page) without losing (modified) content
* Possible to turn it on and off on demand (on the page) without losing (possibly modified) content (see [http://wiki.moxiecode.com/examples/tinymce/installation_example_07.php this TinyMCE example of this])
* Right-to-left text input
* Right-to-left text input
* Smileys (has to be possible to use the Moodle list of smileys)
* Smileys (has to be possible to use the Moodle list of smileys)
Line 37: Line 37:
* [http://developer.yahoo.com/yui/editor/ Yahoo RTE]: [http://developer.yahoo.com/yui/docs/module_editor.html Documentation], [http://developer.yahoo.com/yui/examples/editor/index.html Demo],  
* [http://developer.yahoo.com/yui/editor/ Yahoo RTE]: [http://developer.yahoo.com/yui/docs/module_editor.html Documentation], [http://developer.yahoo.com/yui/examples/editor/index.html Demo],  
As of 16 April 2008, the preference goes to TinyMCE.
As of 16 April 2008, the preference goes to TinyMCE.
== Plan of action ==
* Get code in HEAD before 13 May 2008 so that work can be done there
* Have the XHTML profile active by default in TinyMCE
=== Problems & Solutions ===
=== Plugins to write ===
Some plugins will have to be written for each editor to make integration with Moodle possible.  These should be as abstracted as possible, to make as much code as possible common between each
* Language files: Moodle has a lot more languages than any editors, and some strings will be Moodle-specific.  We need a way to make the editors use Moodle strings
* File browser: the file browser (especially with the [[Repository API]]) will be Moodle specific
* Emoticons (smileys): Moodle defines it's own list of emoticons, we need to make a plugin to use them
* Equation editor: there is [[DragMath_equation_editor| ongoing work]] to get [http://www.dragmath.bham.ac.uk/ Dragmath] working in Moodle, making a common plugin could be a nice improvement
* It may be possible to use Moodle's CSS files to define editors themes/skins, this needs investigation


== Links to forum discussions, tracker, docs, etc. ==
== Links to forum discussions, tracker, docs, etc. ==
* [http://tracker.moodle.org/browse/MDL-11113 MDL-11113 - Get a fully working HTML editor in Moodle]
* [http://tracker.moodle.org/browse/MDL-11113 MDL-11113 - Get a fully working HTML editor in Moodle]
* [[Development:Moodle-specific customisations to the HTML editor]]
* [[Development:Moodle-specific customisations to the HTML editor]]

Revision as of 09:08, 6 May 2008

This page details the specification of the HTML editor in Moodle 2.0.

What we want

Ticket MDL-11113 discusses most issues.

Requirements

  • Integration - With Moodle (smileys, different formats, etc.) with a minimum of changes, cleaning up current code as much as possible
  • Compatibility - With web browsers (mostly FF, IE, Safari, Opera)
  • Standard - Outputs valid XHTML code
  • Accessibility - Is it 100% keyboard accessible? Is it usable in JAWS? Etc.
  • Configurability - Possibility to make it show different options and buttons according to the user, the context, etc.
  • Support - Developed by an active community that will support it for a long time.

Features

Some features that should be evaluated:

  • Handling of Word documents
  • HTML code direct editing
  • Highlighting (not text background color, with "set-on" operation--Word style)
  • Image uploading
  • Mathematical formulas/equation editing
  • Possible to turn it on and off on demand (on the page) without losing (possibly modified) content (see this TinyMCE example of this)
  • Right-to-left text input
  • Smileys (has to be possible to use the Moodle list of smileys)
  • Special characters
  • Tables
  • Themeable (possible to make a theme that fits with Moodle's)

Wishes

  • Make it possible to change to a different editor (provided someone comes up with the necessary code to "plug it" in Moodle)
  • Possible to run many instances on the same page (see MDL-11101 in tracker)
  • Fix all the bugs related to the HTML editor
  • Submit drafts in the background, using ajax.

Possibilities and evaluation

As of 16 April 2008, the preference goes to TinyMCE.

Plan of action

  • Get code in HEAD before 13 May 2008 so that work can be done there
  • Have the XHTML profile active by default in TinyMCE

Problems & Solutions

Plugins to write

Some plugins will have to be written for each editor to make integration with Moodle possible. These should be as abstracted as possible, to make as much code as possible common between each

  • Language files: Moodle has a lot more languages than any editors, and some strings will be Moodle-specific. We need a way to make the editors use Moodle strings
  • File browser: the file browser (especially with the Repository API) will be Moodle specific
  • Emoticons (smileys): Moodle defines it's own list of emoticons, we need to make a plugin to use them
  • Equation editor: there is ongoing work to get Dragmath working in Moodle, making a common plugin could be a nice improvement
  • It may be possible to use Moodle's CSS files to define editors themes/skins, this needs investigation

Links to forum discussions, tracker, docs, etc.

Using Moodle General developer forum discussions: