Я автор https://github.com/shaunsephton/django-ckeditor/.
Я только что обновил репозиторий для поддержки настройки шаблонов виджетов.
Теперь вы сможете интегрировать плагин wordcount, указав его как часть настройки CKEDITOR_CONFIGS
:
CKEDITOR_CONFIGS = {
'default': {
'extraPlugins': 'wordcount',
}
}
и затем переопределить шаблон ckeditor/widget.html
, чтобы он выглядел так:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<input name="contentWordCount" type="hidden" value="250" />
<textarea{{ final_attrs|safe }}>{{ value }}</textarea>
<script type="text/javascript">
CKEDITOR.replace("{{ id }}", {{ config|safe }});
</script>
Я загрузил jQuery здесь через API Google в качестве примера.