diff --git a/django_quill/templates/django_quill/media.html b/django_quill/templates/django_quill/media.html index 6757fe6..b102a3f 100644 --- a/django_quill/templates/django_quill/media.html +++ b/django_quill/templates/django_quill/media.html @@ -5,8 +5,8 @@ - - + + diff --git a/docs/pages/using-as-form.md b/docs/pages/using-as-form.md index 20f9afb..4b0999c 100644 --- a/docs/pages/using-as-form.md +++ b/docs/pages/using-as-form.md @@ -1,5 +1,28 @@ # Using as Form +Add the CSS and JS to the `` of the template or base template. + +There are two ways to add CSS and JS files to a template. + + - If there is a **Form** with QuillField added, add `{{ form.media }}` to the `` tag. + + ```django + + {{ form.media }} + + ``` + + - Or, import CSS and JS files directly using `{% include %}` template tags. + + ```django + + + {% include 'django_quill/media.html' %} + + ``` + + + Add `QuillFormField` to the **Form class** you want to use. ```python @@ -25,7 +48,6 @@ def form_view(request): ``` - In the template, use the received **Form instance** variable. (in the above case, **'form'**) ```html