Fixed: CKEditor plugins not working with django-ckeditor

Viewed 253

I wanted to install easyimage plugin. I unpacked zip file to plugins folder so it's in static/ckeditor/ckeditor/plugins/easyimage

settings.py

STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
CKEDITOR_UPLOAD_PATH = 'uploads/'
CKEDITOR_IMAGE_BACKEND = 'pillow'



CKEDITOR_UPLOAD_PATH = 'uploads/'
CKEDITOR_IMAGE_BACKEND = 'pillow'

CKEDITOR_CONFIGS = {
    'default': {
        'toolbar': 'Custom',
        'toolbar_Custom': [
            ['Bold', 'Italic', 'Underline'],
            ['NumberedList', 'BulletedList'],
            ['Link', 'Unlink'],
            ['EasyImageUpload']
        ],
        'width': '100%',
        'height': 100,
        'extraPlugins': ','.join(
            [
               'easyimage','
               'dialog',
               'balloontoolbar',
               'cloudservices',
               'button'
            ]
        ),

    },

and i still get error GET http://192.168.0.3:8000/static/ckeditor/ckeditor/plugins/easyimage/plugin.js?t=K5H9 net::ERR_ABORTED 404 (Not Found)

ckeditor.js:270 Uncaught Error: [CKEDITOR.resourceManager.load] Resource name "easyimage" was not found at "http://192.168.0.3:8000/static/ckeditor/ckeditor/plugins/easyimage/plugin.js?t=K5H9".

Edit: forms.py

from django import forms
from ckeditor.widgets import CKEditorWidget
from ckeditor_uploader.widgets import CKEditorUploadingWidget

class TaskDescriptionForm(forms.Form):
    description = forms.CharField(widget=CKEditorUploadingWidget())

    class Meta:
        fields = ['description']

models.py

description = RichTextUploadingField(blank=True, null=True)

Edit2: I added dependencies, but I still get 404. Edit3: I had my plugins in wrong directory

0 Answers
Related