1

I have a TextField for description on one of my forms, and i want to apply reich text editor for that so tried to use this package, but i am unable to make it work

below are my settings

settings.py

INSTALLED_APPS = (
    .....
    ..... 
    # Description Rich text editor settings
    'tinymce',
    'django_wysiwyg',
)

DJANGO_WYSIWYG_FLAVOR = "tinymce"

template.html

{% extends "base.html" %}
{% load wysiwyg %}
{% wysiwyg_setup %}

<form enctype="multipart/form-data" action="{% url 'product_create' %}" method="post">

    <div class="marg_tp38 span12">
         {{product_form.name}}
         {% wysiwyg_editor 'id_name' %}
    </div>
    <div class="marg_tp38 span12">
         {{product_form.description}}
         {% wysiwyg_editor 'inputdescription_id' %}
    </div>
</form>

So above are my settings that i have used, but i could n't able to make that work, can anyone please let me know what am i missing ? and what should be done in order to make it work ?

Community
  • 1
  • 1
Shiva Krishna Bavandla
  • 25,548
  • 75
  • 193
  • 313

1 Answers1

1
  • Move {% wysiwyg_setup %} in head section

  • Make sure you have copied tinymce in static folder, and set correct path for DJANGO_WYSIWYG_MEDIA_URL in settings as mentioned on documentation.

Mutant
  • 3,663
  • 4
  • 33
  • 53