4

I want to add some additional buttons to django-cms-ckeditor, so I read manual and add plugin to ckeditor folder and config.js, after that I saw them from sample html of cKeditor. But I can't make that button appear in django cms editing window.

I added this to my settings.py, where 'Abbr' is my button, but I still see all buttons except mine.

  CKEDITOR_SETTINGS = {
    'toolbar_CMS':[[ 'Image', 'Flash', 'Table', 'HorizontalRule','Smiley', 'SpecialChar', 'PageBreak', 'Iframe', 'Abbr' ] },],
vZ10
  • 2,468
  • 2
  • 23
  • 33

1 Answers1

1

It's been a while since the question has been asked. Still, here's what I did. Hopefully it also helps you:

  1. In my static directory I added the subdirectory tree djangocms_text_ckeditor/plugins/
  2. I used downloadable ckeditor plugins which I placed in this directory. A plugin consists of a folder itself, e.g. embed/. In the folder you will have a file called plugin.js and potentially additional resources.
  3. The CKEDITOR_SETTINGS dictionary looks like this:

In settings.py:

CKEDITOR_SETTINGS = {
     'extraPlugins': 'cmsplugins,embed,fontawesome', # comma-separated list
     'toolbar_CMS': [
         [ 'ShowBlocks', '-', 'Embed', 'FontAwesome'],
     ],
 }
Fabian
  • 571
  • 5
  • 24