2

I have tried tinymce. But, it has dependency of communicating to tinymce site for checking plugins.

Is there any other completely opensource text editor to be used in django 2?

Quill seems not stable for django 2. I need to make changes at serveral places, but still couldn't make it work.

GP92
  • 433
  • 1
  • 12
  • 30

1 Answers1

2

I would suggest using django-ckeditor project, it's really easy to use and actively maintained. It is primarily meant to be used with Django admin, but it can also be used outside of the admin, in your custom templates.

One thing I found very powerful (and I believe not actually documented in django-ckeditor) is that you can directly use any of the "original" CKEditor's configuration settings within the CKEDITOR_CONFIGS dictionary in your settings.py.

E.g. if you wanted to set up code highlighting, and you've found CKEditor's option to change the highlighter theme is:

config.codeSnippet_theme = 'school_book';

you would add it directly to the CKEDITOR_CONFIGS dictionary:

CKEDITOR_CONFIGS = {
    'your_config_name': {
        ...
        'codeSnippet_theme': 'school_book',
        'extraPlugins': ','.join(
            [
                'codesnippet',
                ...
            ]
        )
    },
}
bonidjukic
  • 1,461
  • 1
  • 13
  • 19
  • Thanks and for the javascript part, do we need to always hardcode the div id of the text editor or write our own logic to use variable names? – GP92 Mar 06 '18 at 10:20
  • I didn't quite understand your question? – bonidjukic Mar 06 '18 at 11:02
  • 1
    I just got done trying out tinymce and summernote editor for DJango. I tried this one last after reading your post and I wish I had tried it first! – Hildy Feb 05 '19 at 17:53
  • Can I use django-ckeditor or do I have to pay for the plan mentioned in the website? I am not eligible for free plan.. – Ulvi Jul 04 '20 at 12:19
  • 1
    @UlviDamirli It seems that CKEditor project has updated their licensing between v4 and v5, but I can't really advise on the legality of usage and what that means for your use case. – bonidjukic Jul 06 '20 at 07:38