Merge pull request #30495 from overleaf/mg-context-menu-paste

[web] Support paste with formatting in context menu

GitOrigin-RevId: 551ed1d49ca423395bd9bfc756e10e8d59d71ecd
This commit is contained in:
Malik Glossop
2026-01-15 14:19:03 +00:00
committed by Copybot
parent f087d125c1
commit a0fc14b367
8 changed files with 390 additions and 114 deletions
@@ -45,3 +45,16 @@ export async function findImageInClipboard(): Promise<File | null> {
return null
}
export const handleImagePaste = async (): Promise<boolean> => {
const imageFile = await findImageInClipboard()
if (imageFile) {
dispatchFigureModalPasteEvent({
name: imageFile.name,
type: imageFile.type,
data: imageFile,
})
return true
}
return false
}