Home > Enterprise >  Add css style to django ckeditor
Add css style to django ckeditor

Time:02-12

I'm using django ckeditor

I can add and edit HTML tags, but can't add CSS styles enter image description here

Is there any way to add CSS style to the content?

CodePudding user response:

You can add 'allowedContent': True to your CKEDITOR_CONFIGS, in the settings.py file:

CKEDITOR_CONFIGS = {
    'default': {
        # ... your default config...
        'allowedContent': True
    }
}

You can see a full config example in the docs: https://django-ckeditor.readthedocs.io/en/latest/#example-ckeditor-configuration

  • Related