}
function getInlineImageIds(element: HTMLElement): number[] {
- const messageTabMenu = element.nextElementSibling;
- if (!messageTabMenu || !messageTabMenu.classList.contains("messageTabMenu")) {
+ const messageTabMenu = document.querySelector<HTMLElement>(
+ `.messageTabMenu[data-wysiwyg-container-id="${element.id}"]`,
+ );
+ if (!messageTabMenu) {
return [];
}
});
}
function getInlineImageIds(element) {
- const messageTabMenu = element.nextElementSibling;
- if (!messageTabMenu || !messageTabMenu.classList.contains("messageTabMenu")) {
+ const messageTabMenu = document.querySelector(`.messageTabMenu[data-wysiwyg-container-id="${element.id}"]`);
+ if (!messageTabMenu) {
return [];
}
const attachmentList = messageTabMenu.querySelector(".formAttachmentContent > .formAttachmentList");