loading...

TinyMCE Django form won't submit.

yelluw profile image Pablo Rivera ・1 min read

I'm building a django application that uses TinyMCE. Forms that had the TinyMCE widget were not submitting.

My models were:

    title = models.CharField(max_length=255)
    slug = models.SlugField(max_length=255)
    content = models.TextField()

The problem is that in order to use TinyMCE you have to change any TextFields to include blank=True.

Your code would end up like so:

    title = models.CharField(max_length=255)
    slug = models.SlugField(max_length=255)
    content = models.TextField(blank=True)

I was using a ModelForm which inherits certain properties from the model.

PS. Spent 2 hours with this. Hope I saved you as much time.

Discussion

pic
Editor guide
 

Thank you for sharing.