django-cms / djangocms-text-ckeditor

Text Plugin for django CMS using CKEditor 4
https://www.django-cms.org/en/repositories-plugins/
BSD 3-Clause "New" or "Revised" License
164 stars 186 forks source link

Deprecation warning for plugin Flash #655

Closed jrief closed 8 months ago

jrief commented 8 months ago

Whenever I open a text-ckeditor plugin, I get this deprecation warning:

Screenshot 2023-10-13 at 08 54 38

I know, @fsbraun disabled "flash" in 31cb918c4a7dede92027a695e77ae5b0b8f818ff , so it seems strange that it still is in use. It seems that it has to be removed from here, which is a file beyond our control.

fsbraun commented 8 months ago

I agree. It's an artefact from using Ckeditor 4. It could (only) be removed by patching Ckeditor 4.

MacLake commented 8 months ago

No, you can also remove the Flash plug-in in the config. While defining the set of buttons doesn’t seem to help, using 'removePlugins' does the trick. I just learnt that from Vinit’s answer in the Slack support channel when I asked how to get rid of Word formatting. So here are my settings:

CKEDITOR_SETTINGS: dict[str, Union[str, list]] = {
    'removePlugins':
        ['pastefromword', 'flash'],
    'pasteFilter':
        "p b i u h1 h2 h3 h4 h5 h6 ul ol li; table tr td sub sup; a[href]",
    'stylesSet': 'default:/static/js/addons/ckeditor.wysiwyg.js',
    'contentsCss': ['/static/semantic/semantic.min.css'],
}
MacLake commented 8 months ago

I’ve added it to the default config: https://github.com/django-cms/djangocms-text-ckeditor/pull/656