How to strip images from pasted content in the Block Editor? #72491
Unanswered
gion-andri
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to find a way to strip all images when a user pastes external content into the block editor (for example, from another website or a Word document).
I’ve looked for a hook or filter to modify the paste behavior, but I can’t find a clear way to intercept or change what gets passed into the paste handler.
Is there a way to:
pasteHandler, orIdeally, I’d like to remove any
<img>tags (or block equivalents) before they are inserted into the post content.Thanks in advance for any pointers!
Beta Was this translation helpful? Give feedback.
All reactions