Pasting rich content with a custom context menu

I’m working on an app where we’ve replaced the system context menu with a custom HTML one. We’ve been trying to figure out how to replicate paste events correctly—we can get the clipboard’s data with await, but we’re not sure how to pass that output off to ProseMirror.

Poking around prosemirror-view, there are a few functions like capturePaste that seem useful but aren’t exported. Wondering if anybody has worked something out for a similar feature.

1 Like

Does this patch look like it would help?

Yes! This should be exactly what I need. Thank you so much.

Great. I’ve tagged 1.30.0