django-ckeditor-5 icon indicating copy to clipboard operation
django-ckeditor-5 copied to clipboard

Cant configure wordCount plugin

Open Mxgra opened this issue 1 year ago • 1 comments

Hi, first of, thanks for the great django implementation of ckeditor!

I'm learning a little django on the side and just upgraded to django-ckeditor-5, but it seems that I now can't configure the wordCount plugin? Specifically I want to limit the number of chars one can write. E.g from my settings.py the CKEDITOR_5_CONFIGS:

'profiles': {
        'toolbar': ['heading', '|', 'bold', 'italic', 'link', '|' 'numberedList',
                    'bulletedList', '-', 'undo', 'redo'],
        "height": 291,
        "width": 'auto',
        "resize_minWidth": 940,
        "filebrowserWindowWidth": 940,
        "filebrowserWindowHeight": 725,
        'wordCount' : { "displayWords": "false",
                       "displayCharacters": "false",
                        'showCharCount': 'true',
                        'showWordCount': 'false',
                       'showParagraphs': 'false',
                       'maxCharCount': '5',
                       'showRemaining': 'true',
                       'countHTML': 'true',
                       'countSpacesAsChars': 'false',
                       'countLineBreaks': 'false',}  # Set the maximum word count
    },

Probably I'm doing something wrong, but maybe there's a bug somewhere? I searched around and couldn't find a solution or other people with my problem...

Mxgra avatar Apr 04 '24 10:04 Mxgra

@Mxgra as far as I can see the word count plugin is literally just that, it shows the amount of words / characters. It can't do anything else, e.g. limit the number of characters. According to https://github.com/ckeditor/ckeditor5/issues/2573 this feature hasn't made it into ckeditor5 yet.

goapunk avatar Apr 08 '24 11:04 goapunk