mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
added improved delete logic in modals
This commit is contained in:
parent
d3a9a764dc
commit
67eeced439
@ -150,4 +150,4 @@ export const TiptapExtensions = (
|
||||
TableHeader,
|
||||
CustomTableCell,
|
||||
TableRow,
|
||||
];
|
||||
];
|
||||
|
@ -25,7 +25,7 @@ const TrackImageDeletionPlugin = () =>
|
||||
// Check if the node still exists elsewhere in the document
|
||||
let nodeExists = false;
|
||||
newState.doc.descendants((node) => {
|
||||
if (node.attrs.id === oldNode.attrs.id) {
|
||||
if (node.attrs.src === oldNode.attrs.src) {
|
||||
nodeExists = true;
|
||||
}
|
||||
});
|
||||
@ -37,6 +37,7 @@ const TrackImageDeletionPlugin = () =>
|
||||
|
||||
removedImages.forEach((node) => {
|
||||
const src = node.attrs.src;
|
||||
console.log("Image deleted: ", src, node.attrs.id)
|
||||
onNodeDeleted(src);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user