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
@@ -6,7 +6,12 @@ import {
EditorMenuProps,
ShouldShowProps,
} from "@/features/editor/components/table/types/types.ts";
import { ActionIcon, Modal, Tooltip, useComputedColorScheme } from "@mantine/core";
import {
ActionIcon,
Modal,
Tooltip,
useComputedColorScheme,
} from "@mantine/core";
import { useDisclosure } from "@mantine/hooks";
import clsx from "clsx";
import {
@@ -194,7 +199,7 @@ export function DrawioMenu({ editor }: EditorMenuProps) {
shouldShow={shouldShow}
>
<div className={classes.toolbar}>
<Tooltip position="top" label={t("Align left")}>
<Tooltip position="top" label={t("Align left")} withinPortal={false}>
<ActionIcon
onClick={alignLeft}
size="lg"
@@ -206,7 +211,11 @@ export function DrawioMenu({ editor }: EditorMenuProps) {
</ActionIcon>
</Tooltip>
<Tooltip position="top" label={t("Align center")}>
<Tooltip
position="top"
label={t("Align center")}
withinPortal={false}
>
<ActionIcon
onClick={alignCenter}
size="lg"
@@ -232,7 +241,7 @@ export function DrawioMenu({ editor }: EditorMenuProps) {
<div className={classes.divider} />
<Tooltip position="top" label={t("Edit")}>
<Tooltip position="top" label={t("Edit")} withinPortal={false}>
<ActionIcon
onClick={handleOpen}
size="lg"
@@ -243,7 +252,7 @@ export function DrawioMenu({ editor }: EditorMenuProps) {
</ActionIcon>
</Tooltip>
<Tooltip position="top" label={t("Download")}>
<Tooltip position="top" label={t("Download")} withinPortal={false}>
<ActionIcon
onClick={handleDownload}
size="lg"
@@ -254,7 +263,7 @@ export function DrawioMenu({ editor }: EditorMenuProps) {
</ActionIcon>
</Tooltip>
<Tooltip position="top" label={t("Delete")}>
<Tooltip position="top" label={t("Delete")} withinPortal={false}>
<ActionIcon
onClick={handleDelete}
size="lg"