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
@ -25,7 +25,7 @@ const TrackImageDeletionPlugin = () =>
|
|||||||
// Check if the node still exists elsewhere in the document
|
// Check if the node still exists elsewhere in the document
|
||||||
let nodeExists = false;
|
let nodeExists = false;
|
||||||
newState.doc.descendants((node) => {
|
newState.doc.descendants((node) => {
|
||||||
if (node.attrs.id === oldNode.attrs.id) {
|
if (node.attrs.src === oldNode.attrs.src) {
|
||||||
nodeExists = true;
|
nodeExists = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -37,6 +37,7 @@ const TrackImageDeletionPlugin = () =>
|
|||||||
|
|
||||||
removedImages.forEach((node) => {
|
removedImages.forEach((node) => {
|
||||||
const src = node.attrs.src;
|
const src = node.attrs.src;
|
||||||
|
console.log("Image deleted: ", src, node.attrs.id)
|
||||||
onNodeDeleted(src);
|
onNodeDeleted(src);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user