Details
-
Type:
Sub-task
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0
-
Component/s: HTML Editor
-
Labels:None
-
Affected Branches:MOODLE_20_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
We need to create the specs for a "plug-in layer" that will sit between Moodle and the code of each editor. The files for this should be separated from the files received in orignal editor distribution (in tinymce case, that means out of the jscripts folder).
Janne Mikkonen starter such a layer two years ago, in the form of the files editorname.class.php. As TinyMCE has changed quite a lot since then, the file needs to be reworked: the configuration variables have changed, the __is_valid_key() function could possibly be removed, etc.
The starting code (as sent in by Mauno K.) and the older code from Janne need to be merged.
Here's a patch that applies to cvs HEAD, heavily based on the code that was in Mauno's 1.9 zipfile, posted in the forum, last week.
I am not committing this to the repository, mostly because the change from use_html_editor() to use_admin_editor() needs to be clarified (and if do change, there are a lot more places where this needs to be fixed) (and use_html_editor() deleted, or moved to deprecatedlib.php). Committing this now would make the code in a "clearly uncertain" state.
This has less functionality than what Mauno has in his zipfile, but should make it easier to add it back later.
I'll be out of town for two weeks, will be back on the 28th... to work on that and everything else.
- I added some administration settings, so that the admin can choose the default html editor.
- I reverted the user selection: we will need to create something a bit more complicated, based on formats.
- The /0/, /1/, ... folders have been merged back into the editor folder.
- A new function has been added to moodlelib.php to detect which editors are available on disk.
- A few more changes/fixes: removed php4 compat, cleaned up based on coding standards, etc.
I am not committing this to the repository, mostly because the change from use_html_editor() to use_admin_editor() needs to be clarified (and if do change, there are a lot more places where this needs to be fixed) (and use_html_editor() deleted, or moved to deprecatedlib.php). Committing this now would make the code in a "clearly uncertain" state. This has less functionality than what Mauno has in his zipfile, but should make it easier to add it back later. I'll be out of town for two weeks, will be back on the 28th... to work on that and everything else.