Problem/Motivation

As identified in #3211049-5: [META] Add all plugins which are available in Drupal core's build of CKEditor 4.1: we do not have a "remove formatting" button currently in the Drupal CKEditor 5 module. This is valuable when cleaning up pasted content. See demo at https://ckeditor.com/docs/ckeditor5/latest/features/remove-format.html#demo.

Proposed resolution

Add https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-rem... to our build.

Remaining tasks

  1. Add remove-format plugin to js/scripts/build.js
  2. Create library for the plugin in ckeditor5.libraries.yml
  3. Create plugin definition for the plugin in ckeditor5.ckeditor5.yml

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork ckeditor5-3227875

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers created an issue. See original summary.

Wim Leers’s picture

Title: Add ckeditor5-paste-from-office to allow pasting from Microsoft Office & Google Docs » Add ckeditor5-remove-format to allow removing formatting from pasted content
Related issues: +#3227871: Add ckeditor5-paste-from-office to allow pasting from Microsoft Office & Google Docs
lauriii’s picture

Issue summary: View changes

yash.rode made their first commit to this issue’s fork.

yash.rode’s picture

Status: Active » Needs review
yash.rode’s picture

  • lauriii committed 670d8bb on 1.0.x authored by yash.rode
    Issue #3227875 by yash.rode, Wim Leers, lauriii: Add ckeditor5-remove-...
lauriii’s picture

Status: Needs review » Fixed

Tested this manually to ensure that the button can be added to toolbar, and formatting can be removed from text. All looks good now!

Wim Leers’s picture

Nice! :)

Wim Leers’s picture

Status: Fixed » Needs work

Can we add a second merge request to this issue so we can also update \Drupal\ckeditor5\SmartDefaultSettings::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem()'s mapping for RemoveFormat? 🙏

yash.rode’s picture

FileSize
0 bytes
yash.rode’s picture

Status: Needs work » Needs review
FileSize
790 bytes
yash.rode’s picture

Status: Needs review » Needs work

The last submitted patch, 14: Drupal-mapping_changes-3227875-14.patch, failed testing. View results

Wim Leers’s picture

Perfect! Now all we need to do is update the test expectations 😊

yash.rode’s picture

yash.rode’s picture

Status: Needs work » Needs review
Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

Perfect! Thanks 😊

  • Wim Leers committed def76f5 on 1.0.x authored by yash.rode
    Issue #3227875 by yash.rode, lauriii, Wim Leers: update mapping of...
Wim Leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.