Open niegowski opened 1 month 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).
π 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
PasteFromOffice
is ignoring the prepared view document fragment and is performing a separate normalization on the data transfer payload: https://github.com/ckeditor/ckeditor5/blob/d874050e08510019487e2f8cd7ebf7e1ad7a137e/packages/ckeditor5-paste-from-office/src/pastefromoffice.ts#L83 https://github.com/ckeditor/ckeditor5/blob/d874050e08510019487e2f8cd7ebf7e1ad7a137e/packages/ckeditor5-paste-from-office/src/pastefromoffice.ts#L88Those 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.