You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have an optional editor field in my model, for example body = CKEditor5Field(blank=True), then saving the form without filling any content into the text editor still stores <p> </p> as its content. So that means if I then check if there is content (if self.body), this will always say that there is content.
It means I now manually have to trim <p> </p> from the content before making this check, or before storing the content. Why is the editor storing this empty paragraph when no content has been entered?
The text was updated successfully, but these errors were encountered:
Hi @kevinrenskers as far as I remember ckeditor5 always add as empty paragraph, there's no way to prevent that. We could probably add a check somewhere to remove the empty paragraph though.
When I have an optional editor field in my model, for example
body = CKEditor5Field(blank=True)
, then saving the form without filling any content into the text editor still stores<p> </p>
as its content. So that means if I then check if there is content (if self.body)
, this will always say that there is content.It means I now manually have to trim
<p> </p>
from the content before making this check, or before storing the content. Why is the editor storing this empty paragraph when no content has been entered?The text was updated successfully, but these errors were encountered: