feat: editor attachment paste handling (#1975)

* reupload attachments if uploaded to a different page
* use image dimensions on paste/DnD

* tooltips withinPortal:false

* isolating attribute
This commit is contained in:
Philip Okugbe
2026-02-28 01:24:19 +00:00
committed by GitHub
parent df64de5306
commit fc0997fd90
15 changed files with 260 additions and 33 deletions
@@ -61,7 +61,9 @@ const handleVideoUpload =
const objectUrl = URL.createObjectURL(file);
const videoDimensions = await getVideoDimensions(objectUrl);
const placeholderId = generateNodeId();
const aspectRatio = videoDimensions.aspectRatio;
const width = videoDimensions?.width ?? undefined;
const height = videoDimensions?.height ?? undefined;
const aspectRatio = videoDimensions?.aspectRatio;
let placeholderInserted = false;
@@ -76,6 +78,8 @@ const handleVideoUpload =
id: placeholderId,
name: file.name,
},
width,
height,
aspectRatio,
});
@@ -108,6 +112,8 @@ const handleVideoUpload =
attachmentId: attachment.id,
title: attachment.fileName,
size: attachment.fileSize,
width,
height,
aspectRatio,
});