Fix content stripping due to Highlight block raw transform #2563
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The raw transforms definition is traced to be the issue causing the stripping of HTML markup from paste contents. It seems that at some point the editor transforms stopped working as expected. Our Jest tests continued to pass however giving us a false sense of validation. The tests continued to pass until I removed the transform definition. That might indicate a change in approach for how Core does raw transforms, our tests for raw transforms likely need updating.
We used a core function to determine which markup to keep.
getPhrasingContentSchema
Seemingly at some point, the raw transforms started to diverge from the given schema and instead targeted all pasted content.
Screenshots
Types of changes
Removal of a non-functional raw transform definition.
Disable of raw transform test specifically related to this logic.
How has this been tested?
Tested manually in the editor.
Acceptance criteria
Should be able to post formatted content into the editor.
Checklist: