jazzband / django-tinymce

TinyMCE integration for Django
http://django-tinymce.readthedocs.org/
MIT License
1.25k stars 317 forks source link

Editor does not work properly with formsets #444

Open milosev1c opened 11 months ago

milosev1c commented 11 months ago

Django===4.2.4 django-tinymce==3.6.1 Also I use django-admin-sortable==2.3, but this problem appears both with SortableTabularInline and TabularInline

Model looks like that:

class ContentBlock:
    title = models.CharField(max_length=100)
    content = HTMLField()

Inline admin:

class ContentBlockInlineAdmin(SortableTabularInline):
    model = ContentBlock
    extra = 0

As I mentioned before, the same thing happens with TabularInline

When I try to add new row to formset - first row have basic textareafield. Second and following will have tinyMCE editor, but with different settings (I guess it's the default config), and I can't type anything to these. I also can type something to textarea (first added row) and save these changes. If formset already have fields, they will load as ususal. Same if I set extra = 1 (or more).

Here is screenshot: image 1st row was saved before; 2nd row was added by clicking "add more" button 3rd and following was added later

claudep commented 6 months ago

Would you be able to test with code from master branch?

milosev1c commented 5 months ago

@claudep Hi, I checked the version from the master branch -- everything working fine

claudep commented 5 months ago

Thanks for checking, I guess a release should be needed now.