Skip to content

Fix multilingual popup for non-wysiwyg fields

bgm requested to merge bgm/summernote:1.x-getData into 1.x

Hi @VangelisP - I really like this implementation. It "just works".

I stumbled on what I think is a bug with multilingual:

  • Edit an Event, under "Info and Settings"
  • click the multilingual popup for "Event Summary" (which is plain text, not WYSIWYG)
  • the popup opens, but we cannot submit (because of a JS error on getData)

I wasn't really sure how to fix it correctly. In my patch, the first getVal/getData is probably fine, but in setVal I got confused because if we do not have this, then I have a popup that enables the WYSIWYG on only one language:

image

Here the English field has a WYSIYG, and should not. Interestingly, it's always on the English that the editor gets enabled, even if I change the UI language (and the default site language is French).

.. but with my patch on setVal, it surprisingly works as expected (no WYSIWYG enabled on plain text fields). I have to admit I did not dig further to understand why.

Merge request reports

Loading