Block API: pasteHandler() removes iframes too early. #18389
Labels
[Feature] Paste
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Describe the bug
It's possible to register a block with a
raw
transform that converts an iframe to a block. This works as expected when transforming a Classic block into blocks.However, when pasting a matching iframe into the block editor,
pasteHandler()
will run theiframeRemover
filter beforehtmlToBlocks()
is run, so the block transform isn't run.To reproduce
Steps to reproduce the behavior:
pasteHandler()
, to observer the state.piece
before it is passed tohtmlToBlocks()
.Expected behavior
The iframe is passed to
htmlToBlocks()
, so the block transform can handle it.The text was updated successfully, but these errors were encountered: