What steps will reproduce the problem? 1. Create two models
from tinymce import models as tinymce_models class A(models.Model): /* put some fields there, or not */
class B(models.Model): text = tinymce_models.HTMLField() a = models.ForeignKey(A, related_name='bs')
- In admin.py
classBInline(admin.StackedInline): model = models.B fields = ['text']
class AAdmin(admin.ModelAdmin): inlines = [BInline]
In the admin site, create a new A object.
At the bottom of the page, you see a link "Add another B", click it
A new form to edit the newly created B object should appear. It looks like TinyMCE is correctly loaded, but you can not enter the editor and clicking buttons does not have any effect.
What version of Django are you using? On what operating system? Django 1.2.3 / Mac OSX Snow leopard
What version of django-tinymce are you using? 1.5.1dev100
Comment #1
Posted on Oct 7, 2010 by Happy CatI can also confirm this issue. Same OS and django-tinymce versions.
Comment #2
Posted on Nov 19, 2010 by Grumpy MonkeyDamned... And I can confirm this, too. Ubuntu 10.10, Django 1.2.3, django-tinymce 1.5.1.dev101
Comment #3
Posted on Nov 21, 2010 by Grumpy MonkeyI made a solution to solve this issue. Replace django-tinymce's widget.py with attached one.
- widgets.py 5.34KB
Comment #4
Posted on Dec 6, 2010 by Happy HorseI had the same problem and replacing my widgets.py solved it. Thanks
Comment #5
Posted on Dec 13, 2010 by Massive MonkeyThanks Ygarris.
Any change of getting it into the codebase?
Comment #6
Posted on Jan 6, 2011 by Grumpy HippoSeems the widgets.py attached here only partially works (and breaks some other stuff): It does indeed allow to focus and then enter text in fields taken over by tinymce, but it seems only one of the tinymce displayed will "pass on" the edited data.
Example: two tinymce fields, both filled in. Modify the model again, and try to add or remove some text from the two fields, and save: only one (or none?) of the two fields will be updated.
I tested this with three tinymce fields, and only one of the three would be editable AND saveable.
Comment #7
Posted on Jan 8, 2011 by Grumpy MonkeyIt's very strange, because I have a production site that uses this patched widgets.py and it works ok.
I have object with one field that uses tinymce and a relation to other objects each with tinymce field. It displays properly, loads and saves data.
Comment #8
Posted on Jan 29, 2011 by Grumpy MonkeyYes, confirmed... the last inline is not get updated with data entered into tinemce field. It always displays the initial data - what was entered in tinymce field when inline was created.
Comment #9
Posted on Feb 24, 2011 by Grumpy MonkeyHey hey hey! New patch is ready that solves the problem!
widgets.py - js in setTimeout() runs only when new TinyMCE field is added, that prevents form initializing of the last inline with TinyMCE twice.
views.py - fixes mimetype of /tinymce/filebrowser/ response.
- widgets.py 5.5KB
- views.py 4.4KB
Comment #10
Posted on Nov 15, 2011 by Grumpy HippoStill the same issue: the last inline item added can't be modified, as confirmed by comment 8. Seems the latest patches from comment 9 don't solve the issue.
Comment #11
Posted on Feb 15, 2012 by Happy Kangaroodjango-tinymce development (code and issues) moved to github. please reopen this issue on github if it still exists. https://github.com/aljosa/django-tinymce
Comment #12
Posted on Jul 11, 2012 by Happy WombatIf there are more than one TinyMCE field in one row the last field was initialized twice. I've updated Yuri Garris's patch.
- widgets.py 5.77KB
Status: WontFix
Labels:
Type-Defect
Priority-Medium