cherry-pick changes from aleray/django-wymeditor fork