- Issue created by @jacobupal
- Status changed to Postponed
9 months ago 6:59pm 2 April 2024 - 🇨🇦Canada star-szr
Hi @jacobupal! Thanks for writing this up.
I don't currently have any plans or desire to add this feature. Having a separate "paste from word" style button relies on people remembering it's there and using it. I think your idea of making more specific filter rules for your use case makes the most sense for your use case at this time.
Depending on the details of your use case, perhaps a global permission to allow users to skip filtering would be a simpler implementation. This has its own issues and complexities (administrators would get this permission by default) so I'm not fully sold on it either. It's just an idea at this point.
Some other workarounds to mention that should work with the current code, other than customizing rules or using multiple text formats:
- Drag and drop the content around inside the editor instead (admittedly cut/copy/paste is just better for some cases and perhaps more accessible, but I think it's worth mentioning)
- Move content around in the source editor instead
- 🇬🇧United Kingdom jacobupal Leeds
Thank you for the reply!
I'll see how far I get with modifying the filters... "Having a separate "paste from word" style button relies on people remembering it's there and using it." -- I can totally see this, for my uses it would be the lesser of two evils though.
If it was just me using it, this would be fine - though I do generally prefer to the markup myself... However, I predict that our editor, who is not so tech savvy, and will feel the initial benefits of this module, is also going to get very confused if their formatting evaporates whilst editing a piece - I'm then going to be forever tweaking the filter rules for each edge-case that comes up. Hopefully I can can get it right. If I can't, I'll be sad to let go of this module as it is pretty awesome.
That said if I can't find another way around it, I'm sure I can make some time to look into what the implementation of an optional 'filtered paste' button would require
- 🇨🇦Canada star-szr
Another possible approach would be to try to detect the source of the pasted HTML and only filter when certain sources (like MS Word or Google Docs) are detected.
I know CKEditor 5 itself uses logic like this for its paste from office plugin but it's also very easy to get bad markup from other sources, so I'm not totally sure if I want to implement this. Maybe as an opt-in feature with a warning that it only works for Microsoft Word and Google Docs. https://github.com/ckeditor/ckeditor5/blob/e71971206bb3e7e176692a1b973a4...
- Status changed to Closed: won't fix
7 months ago 5:21pm 20 June 2024 - 🇨🇦Canada star-szr
I'm going to close this for now. Not to say "never", but to say "not right now". Thank you for the feature request!