Moodle

enable dragmath tinymce plugin only when tex filter active in current context

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major 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

Activity

Hide
Petr Škoda (skodak) added a comment -

note: handling of text filter changed significantly in HEAD recently

Show
Petr Škoda (skodak) added a comment - note: handling of text filter changed significantly in HEAD recently
Hide
Marc Grober added a comment -

No, dragmath should not be limited to when tex filter is on

Show
Marc Grober added a comment - No, dragmath should not be limited to when tex filter is on
Hide
Petr Škoda (skodak) added a comment -

well, we have to limit the number of icons in editor for usability reasons, having icons that appear to do anythingmeaningless is definitely not good for usability. If some individuals really want it we could add admin setting for that. By the way, did you study the new filter settings interface in 2.0? In any case answers without explanation do not help me much, I am open to suggestions and I am willing to change my mind if you present reasonable arguments, on the other hand I usually ignore comments like this completely, sorry.

Show
Petr Škoda (skodak) added a comment - well, we have to limit the number of icons in editor for usability reasons, having icons that appear to do anythingmeaningless is definitely not good for usability. If some individuals really want it we could add admin setting for that. By the way, did you study the new filter settings interface in 2.0? In any case answers without explanation do not help me much, I am open to suggestions and I am willing to change my mind if you present reasonable arguments, on the other hand I usually ignore comments like this completely, sorry.
Hide
Petr Škoda (skodak) added a comment -

implemented in cvs, more optiosn to be added later, thanks

Show
Petr Škoda (skodak) added a comment - implemented in cvs, more optiosn to be added later, thanks
Hide
Marc Grober added a comment -

I just saw the above and am not sure whether I should respond in kind to your note of June 18 or just move on...

I will make the following points:

a) you, out of nowheres, without any consultation, collaboration or explanation post a tracker that says "enable dragmath only when tex filter active in current context"
b) I responded that this was not acceptable here in this MDL, and provided detailed explanation elsewhere about how dragmath is used and why this is not acceptable....
c) you respond here that you are simply ignoring me....

This is a case, Petr, of the pot calling the kettle black.... and if you want people to be collaborative then you should try being collaborative yourself, shouldn't you?

Show
Marc Grober added a comment - I just saw the above and am not sure whether I should respond in kind to your note of June 18 or just move on... I will make the following points: a) you, out of nowheres, without any consultation, collaboration or explanation post a tracker that says "enable dragmath only when tex filter active in current context" b) I responded that this was not acceptable here in this MDL, and provided detailed explanation elsewhere about how dragmath is used and why this is not acceptable.... c) you respond here that you are simply ignoring me.... This is a case, Petr, of the pot calling the kettle black.... and if you want people to be collaborative then you should try being collaborative yourself, shouldn't you?
Hide
Petr Škoda (skodak) added a comment -

If you do not like it file a new issue and persuade people to vote there, but I would advice you to put better explanation than "No, dragmath should not be limited to when tex filter is on" there.

Show
Petr Škoda (skodak) added a comment - If you do not like it file a new issue and persuade people to vote there, but I would advice you to put better explanation than "No, dragmath should not be limited to when tex filter is on" there.
Hide
Mauno Korpelainen added a comment -

Marc,

I think we can handle cases like Dragmath using AsciiMathML without tex filter if we will create an optional/advanced Math editor version anyway. All you need to do is to change lines in current configuration of tinymce

$filters = filter_get_active_in_context($context);
if (array_key_exists('filter/tex', $filters)) { $xdragmath = 'dragmath,'; } else { $xdragmath = ''; }

to

$xdragmath = 'dragmath,';

and Dragmath is always visible in your editor (TinyMCE) even if TeX filter is disabled (AsciiMathML can be used for rendering TeX inside double dollars if people do not want to use TeX filter...)

Not a big problem - unless you two start fighting...

One additional $CFG setting like $CFG->dragmathallwaysenabled could do the same job but if the default editor should have minimal number of buttons I vote for creating that Math editor and selecting it from administration menu (or later user preferences?) if needed.

Show
Mauno Korpelainen added a comment - Marc, I think we can handle cases like Dragmath using AsciiMathML without tex filter if we will create an optional/advanced Math editor version anyway. All you need to do is to change lines in current configuration of tinymce $filters = filter_get_active_in_context($context); if (array_key_exists('filter/tex', $filters)) { $xdragmath = 'dragmath,'; } else { $xdragmath = ''; } to $xdragmath = 'dragmath,'; and Dragmath is always visible in your editor (TinyMCE) even if TeX filter is disabled (AsciiMathML can be used for rendering TeX inside double dollars if people do not want to use TeX filter...) Not a big problem - unless you two start fighting... One additional $CFG setting like $CFG->dragmathallwaysenabled could do the same job but if the default editor should have minimal number of buttons I vote for creating that Math editor and selecting it from administration menu (or later user preferences?) if needed.
Hide
Petr Škoda (skodak) added a comment -

Again this is big a misunderstanding of my changes and intentions - I am NOT breaking YOUR math plugins, I am just making sure the current tinymce dragmath plugin works reasonably well in standard installation - that is all, it is not going to support anything else except tex output format and will be linked to tex filter settings.

I understand it is not what everybody wants, I am not arguing that at all. Hacking standard dragmath plugin is not a proper solution imo, instead I want to make both editors but also tinymce plugins completely configurable/pluggable with no ugly hardcoded hacks.

If you need/want to change anything there you will have two options:
1/ creatate lib/editor/mceadvanced/ brand new editor integration - partly possible now, but not finished
2/ add newlib/editr/tinymce plugins - I will continue talking about this option only, this is not implemented yet at all, until now I was refactoring the code in order to make this possible

There should be configuration options and user preferences for each tinymce plugin, I think in order to simplify UI we will need to create some kind of "editor setups" which list enabled plugins and then users will be able to select them in their preferences. It should be also possible to switch those "setups" on-the-fly. The user editor preferences should define preferred editor for each text format - each user would be able to choose from unlimited list of plugins for each format. Of course the core will have only really basic set of editors - tinymce, some wiki editor and plain textarea.

Going back to Mark's request, I would recommend adding new dragmathadvanced tinymce plugin into contrib, then anybody wishing to use it may simple install it and configure it enabled and standard dragmath disabled. Or they can create to "editor setups" one with standard, the other with advanced dragmath.

I did not emphasise it much yet, but since some weeks aga there is a new possibility to add plugins into /local/ directly, this may allow the tinymce plugins to have own capabilities and even database tables :-O you simply put the tinymce interation hooks into lib/editor/tinymce/plugins/advdragmath and the rest (capabilities, tables, admin settings, user preferences) into /local/advdragmath/

I suppose Manuo understands my intentions completely.

Mark please stop blaming me I am breaking your toys and instead think a bit more about this more modular editor design please

Show
Petr Škoda (skodak) added a comment - Again this is big a misunderstanding of my changes and intentions - I am NOT breaking YOUR math plugins, I am just making sure the current tinymce dragmath plugin works reasonably well in standard installation - that is all, it is not going to support anything else except tex output format and will be linked to tex filter settings. I understand it is not what everybody wants, I am not arguing that at all. Hacking standard dragmath plugin is not a proper solution imo, instead I want to make both editors but also tinymce plugins completely configurable/pluggable with no ugly hardcoded hacks. If you need/want to change anything there you will have two options: 1/ creatate lib/editor/mceadvanced/ brand new editor integration - partly possible now, but not finished 2/ add newlib/editr/tinymce plugins - I will continue talking about this option only, this is not implemented yet at all, until now I was refactoring the code in order to make this possible There should be configuration options and user preferences for each tinymce plugin, I think in order to simplify UI we will need to create some kind of "editor setups" which list enabled plugins and then users will be able to select them in their preferences. It should be also possible to switch those "setups" on-the-fly. The user editor preferences should define preferred editor for each text format - each user would be able to choose from unlimited list of plugins for each format. Of course the core will have only really basic set of editors - tinymce, some wiki editor and plain textarea. Going back to Mark's request, I would recommend adding new dragmathadvanced tinymce plugin into contrib, then anybody wishing to use it may simple install it and configure it enabled and standard dragmath disabled. Or they can create to "editor setups" one with standard, the other with advanced dragmath. I did not emphasise it much yet, but since some weeks aga there is a new possibility to add plugins into /local/ directly, this may allow the tinymce plugins to have own capabilities and even database tables :-O you simply put the tinymce interation hooks into lib/editor/tinymce/plugins/advdragmath and the rest (capabilities, tables, admin settings, user preferences) into /local/advdragmath/ I suppose Manuo understands my intentions completely. Mark please stop blaming me I am breaking your toys and instead think a bit more about this more modular editor design please

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: