Broken with multiple TinyMCE ( patch idea)
-
Briefly, the problem was that when you have more than one tinyMCE editor in the post editing window, clicking a language switching tab would clear the contents of the editor. This was the case only in Visual (tinyMCE) mode.
I dug into the problem.
When switching a language tab, mqTranslate javascript calls
TinyMCE.triggerSave(), which triggersqtrans_hook_on_tinyMCE, which in turn callsqtrans_save(e.content)for ALL TinyMCE editors.qtrans_saveputs the contents of the last TinyMCE editor processed in the#contenttextarea, which is later read byswitchEditors.gowhen updating the current value of the tinyMCE editor (to the language that was just selected).How I fixed it manually was change one line in
qtrans_hook_on_tinyMCElike this:
if (!ed.isHidden())=>if (ed.id == 'qtrans_textarea_content' && !ed.isHidden())An alternative solution would be to call
editor.save()for the relevant editor instead of callingtinyMCE.triggerSave()that saves all editors.Let me know if you need extra info.
The topic ‘Broken with multiple TinyMCE ( patch idea)’ is closed to new replies.