hvlads / django-ckeditor-5

Django CKEditor 5 integration.
Other
154 stars 60 forks source link

How can I use all HTML tags and attributes in code mode editor? #163

Closed twicros closed 1 year ago

twicros commented 1 year ago

Hello. When I try to make some html in code mode, all things is filtred.

I try to add 'allowedContent': True, in settings.py in config CKE-5. But it is not work. This feature work only in CKE 4.

Help me please =)

twicros commented 1 year ago

I add to config this thing:

'htmlSupport': {
            'allow': [
                {
                    'name': '/.*/',
                    'attributes': True,
                    'classes': True,
                    'styles': True,
                }
            ]
        },

now its's work, I think.

Please confirm, is that correct?

hvlads commented 1 year ago

Yes, your code is correct. You can view an example at the following link.