Automatically remove format via a filter

Created on 15 January 2024, 11 months ago
Updated 13 February 2024, 10 months ago

Problem/Motivation

In CKEditor5 there's a button to manually remove format from a pasted content.
It would be nice if we could also have a filter option to do the exact same thing automatically when the option is checked (we wouldn't have to add the button, the action would be automatically triggered on a content save).

Steps to reproduce

None

Proposed resolution

Add a filter option that would be triggered on a content save to remove format

Remaining tasks

TBD

User interface changes

New filter option in the CKEditor 5 text format administration

API changes

None

Data model changes

None

Release notes snippet

TBD

Feature request
Status

Postponed: needs info

Version

11.0 🔥

Component
CKEditor 5 

Last updated about 18 hours ago

Created by

🇫🇷France MacSim

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

  • Issue created by @MacSim
  • 🇫🇷France abdei Paris, Ile de France

    Hello @macsim,

    Take a look at this module https://www.drupal.org/project/ckeditor_remove_format and let me know if that answers your request.
    Much appreciated.
    Regards,
    Abdel

  • 🇫🇷France MacSim

    Hi @abdel

    It's not exactly what I am looking for. Your module removes every HTML tag in the text, I'd like something that works exactly like the "Remove format" button does: it keeps the HTML structure and removes the inline style attributes on all the HTML tags.

    (and I'd really love not to have to add one more module to handle that use case - I think that it's something which might be useful on a lot of websites and could be part of the CKEditor5 module itself)

  • Status changed to Postponed: needs info 10 months ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    removes the inline style attributes on all the HTML tags.

    That was not at all clear to me from reading the issue summary 😅 Can you please expand the issue summary to explain how this relates to:

    1. the RemoveFormat button that has been here all along
    2. the paste from GDocs/Office/… functionality that was improved in [upstream] CKEditor 5 PasteFromOffice plugin should not allow MS Office/Apple Pages/Google Docs-specific classes and styles even when HTML is unrestricted Fixed
    3. the use of (or any text format that does not use the filter_html filter) versus other text formats?
    4. the filter plugins in Drupal core — is that what you're referring to in the title?

    Right now, there's not enough information here to act on it. Yet! 😄

Production build 0.71.5 2024