Theme based default editor selection workaround is possible in moodle 2.0

Theme based default editor selection workaround is possible in moodle 2.0

by Mauno Korpelainen -
Number of replies: 1

Hi Mathieu and Marc,

I was worried in summer about the lack of user, role or theme based selections of editor but the situation is not at all as bad as I thought. Just tested using a new version of tinymce side by side with default configuration. I pasted the "parallel version code" to lib/editor/htmlEditor.class.php and lib/editor/tinymcexx.js.php with a new folder tinymcexx and the selection code Mathieu has written works ok. Tinymcexx could be selected from administration menu to new default editor as expected.

Next I selected two themes and pasted to theme config.php

$CFG->defaulthtmleditor = 'tinymce';

to the first one and

$CFG->defaulthtmleditor = 'tinymcexx';

to the second one

and editor could be changed with theme.

Summa summarium - I believe we can combine the previous theme based integrations to current default editor based integration of moodle 2.0. All settings of configuration can be changed and with help of course themes or user themes a flexible selection system is still possible. It's not a big problem if we have only one default editor (tinymce) in moodle 2.0 - custom editors can use custom language packs etc and for example xinharepla with asciimathml can be used with theme. The conflict between asciimathml and tinymce seems to be caused by same variables in tinymce.js and the svg part of asciimathml.js which makes tinymce non functional if asciimathml is used and this way we have at least one workaround to use both excellent tools - and other custom editor plugins.

Average of ratings: -
In reply to Mauno Korpelainen

Re: Theme based default editor selection workaround is possible in moodle 2.0

by Marc Grober -
Somehow I missed this post so was a bit perplexed by your most recent post with the work around..... I do not have a current Moodle HEAD install which is a problem so will try and get something up but it is a very bust time for me and I am getting behinder by the hour.....