romanvm / django-tinymce4-lite

TinyMCE 4 editor widget for Django
MIT License
126 stars 47 forks source link

Fix dropped widget attributes with Django >=1.11 #22

Closed bentrm closed 6 years ago

bentrm commented 6 years ago

The signature of the private Widget.build_attrs method has changed with Django 1.11. Due to this attributes added to a TinyMCE widget by other modules will be dropped. I was realizing this when using this module in conjunction with the django-modeltranslation package. The added method is a combination of the pre-1.11 and 1.11 signature. It is overridden to keep compatibility with earlier versions of Django.

django-modeltranslation uses css classes to group translated fields into tabs. Theses classes have been lost if used with a TinyMCE widget.

Before changes:

bildschirmfoto 2017-10-27 um 10 08 46

After changes:

bildschirmfoto 2017-10-27 um 10 06 52
romanvm commented 6 years ago

Thanks, but please submit the PR against the develop branch.

bentrm commented 6 years ago

There you go.

romanvm commented 6 years ago

Thanks!