ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.63k stars 3.71k forks source link

The ClipboardPipeline and PasteFromOffice should allow for common HTML string normalisation before conversion to view #17309

Open niegowski opened 1 month ago

niegowski commented 1 month ago

πŸ“ Provide a description of the new feature

The ClipboardPipeline is performing some HTML normalization (on string) just before converting it to the view document fragment:

https://github.com/ckeditor/ckeditor5/blob/d874050e08510019487e2f8cd7ebf7e1ad7a137e/packages/ckeditor5-clipboard/src/clipboardpipeline.ts#L229-L233

Those cases could be unified as an extension point in the ClipboardPipeline so non-parsed data could be processed before conversion to the view document fragment.


If you'd like to see this feature implemented, add a πŸ‘ reaction to this post.

scotteuser commented 2 weeks ago

I'm thinking this is probably why in our Drupal Footnotes module when trying to update data.content in the input transformation step like this:

Does that sound right? Or I am misunderstanding the suggested feature here? (Sorry not too experienced with CKE code)

For now the only way we can get this to update the editor is to use the writer and stop the event this like but this stops other plugins from kicking in and doing their thing (like setting anchors, stripping gunk from word).