Search code examples
djangodjango-wysiwyg

django-wysiwyg: Use YUI SimpleEditor instead of the default Editor


I'm using django-wysiwyg in my django app, and by default it makes use of YUI's Editor. I'd rather it to use the SimpleEditor, because it's, well, simpler.

Is there an easy way of doing this that doesn't require forking the project? :)


Solution

  • I ended up creating a django_wysiwyg directory under my templates directory, and under it placed:

    - simple_yui
        - includes.html
        - editor_instance.html
    

    Where editor_instance.html simply extends the default one and includes.html is a copy of the default one with SimpleEditor instead of Editor. Then I just had to add to my settings:

    DJANGO_WYSIWYG_FLAVOR = 'simple_yui'
    

    And that what that. Not very clean, but did the trick