Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorjs form field doesn't render in template #50

Open
azaitsev opened this issue Dec 25, 2022 · 1 comment
Open

Editorjs form field doesn't render in template #50

azaitsev opened this issue Dec 25, 2022 · 1 comment

Comments

@azaitsev
Copy link

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?

@dancaron
Copy link

dancaron commented Mar 14, 2023

{% load editorjs %}
{% for field in form %}
    <div class="mydiv">
        <label class="mylabel">{{ field.label }}</label>
        {{ field|editorjs }}
    </div>
{% endfor %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants