django-editorjs-fields
django-editorjs-fields copied to clipboard
Editorjs form field doesn't render in template
I use following form:
class EditForm(forms.Form):
title = forms.CharField(...)
content = EditorJsWidget(config={'minHeight': 100})
and following template code for rendering:
{% for field in form %}
<div class="mydiv">
<label class="mylabel">{{ field.label }}</label>
{{ field }}
</div>
{% endfor %}
I see my title field but no content field. What I'm missing?
{% load editorjs %}
{% for field in form %}
<div class="mydiv">
<label class="mylabel">{{ field.label }}</label>
{{ field|editorjs }}
</div>
{% endfor %}