- Issue created by @star-szr
- @cottser opened merge request.
- Status changed to Needs work
over 1 year ago 9:10pm 17 February 2023 - ๐จ๐ฆCanada star-szr
I can see one or two more default rules we should add to get closer to parity with the CKEditor 4 version, so marking as needs work for that. But if anyone comes across this in the meantime feel free to test it and provide feedback.
The reasoning for more default rules is because CKEditor 5's paste from office plugin doesn't do as much cleanup as the CKEditor 4 version. See also โจ [upstream] CKEditor 5 PasteFromOffice plugin should not allow MS Office/Apple Pages/Google Docs-specific classes and styles even when HTML is unrestricted Fixed .
- ๐จ๐ฆCanada star-szr
I did not try to port the code from https://git.drupalcode.org/project/ckeditor_paste_filter/-/blob/1.0.x/js... since it seems there is no equivalent in CKEditor 5.
- Status changed to Needs review
over 1 year ago 7:34pm 23 February 2023 - ๐ฆ๐นAustria maxilein
Thank you all.
Is this connected: https://www.drupal.org/project/ckeditor5_paste_filter โ or will it be version 2.0?
If so it says there on the module description:This is a CKEditor 5 version of CKEditor Paste Filter with additional features.
may I suggest to add something like this from #3:
I can see (at least) one or two more default rules we should add to get closer to parity with the CKEditor 4 version, so marking as needs work for that. But if anyone comes across this in the meantime feel free to test it and provide feedback.
The reasoning for more default rules is because CKEditor 5's paste from office plugin doesn't do as much cleanup as the CKEditor 4 version. See also #3254346: [upstream] CKEditor 5 PasteFromOffice plugin should not allow MS Office/Apple Pages/Google Docs-specific classes and styles even when HTML is unrestricted.
or even better list the rules implemented?
- ๐จ๐ฆCanada star-szr
Hi @maxilein thanks for taking a look, yes that is where the CKEditor 5 version will end up after thinking about it more, and I have emailed the maintainer of this CKEditor 4 module about it. I need a few days to get things ready on that other project and will update this issue once it's ready.
I have already added additional rules here which you can see in the merge request, the biggest feature I will be adding to the other project is to make the rules fully configurable (mentioned in #5 here), rather than providing only a hardcoded set of rules.
- ๐จ๐ฆCanada star-szr
@taote I am still working on the full project but you can download or clone a working version from https://git.drupalcode.org/issue/ckeditor_paste_filter-3341385/-/tree/33... to test the basic functionality.
- ๐ฎ๐ณIndia JaydipJD surat
Thanks @cottser for the contribution. I will review and release this version once work done.
- ๐จ๐ฆCanada star-szr
@JaydipJD thanks! I actually think the CK4 and CK5 versions should remain separate to ease the upgrade path and would rather close this issue without merging once I have a dev version up for the CK5 version. The config form for the CK5 version is taking a lot longer than expected but is โalmostโ ready now.
I could use some help maintaining https://www.drupal.org/project/ckeditor5_paste_filter โ if you are interested.
- ๐ญ๐บHungary kepesv
https://git.drupalcode.org/issue/ckeditor_paste_filter-3341385/-/tree/33...
Tested and I can confirm that working properly! It could be the initial release as individual project. - ๐จ๐ฆCanada star-szr
Hi @kepesv thank you for your interest and for testing it! The reason why I do not want to release that code as an initial or dev release is that I will immediately need to build an upgrade path to go from hardcoded to configurable filter rules. So I would rather the first public release (even dev release) already have the configurable rules part done.
The full version including configuration sync and configuration UI will be released on https://www.drupal.org/project/ckeditor5_paste_filter โ (I am aiming to have it up this week) and I will update this issue once that is done.
- Status changed to Closed: won't fix
over 1 year ago 9:02pm 4 May 2023 - ๐จ๐ฆCanada star-szr
The first alpha of https://www.drupal.org/project/ckeditor5_paste_filter โ has been released, testing and feedback would be very much appreciated so we can get it to a stable 1.0.0 release. Thanks to everyone who has tested and shown interest on this issue.
I am closing this issue and merge request because releasing the CKEditor 5 project completes what I started here. Thank you.