mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user