Remove unused `WoltlabAttachmentConfig`
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 7 Feb 2024 12:30:14 +0000 (13:30 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 7 Feb 2024 12:30:14 +0000 (13:30 +0100)
ts/WoltLabSuite/Core/Component/Ckeditor/Attachment.ts

index 43d05544843730cc73e0692a00d0508c5b6e5ade..faee715f8703e6e334491ae672b9366d01683776 100644 (file)
@@ -75,35 +75,11 @@ function setupRemoveAttachment(ckeditor: CKEditor): void {
   });
 }
 
-function getInlineImageIds(element: HTMLElement): number[] {
-  const messageTabMenu = document.querySelector<HTMLElement>(
-    `.messageTabMenu[data-wysiwyg-container-id="${element.id}"]`,
-  );
-  if (!messageTabMenu) {
-    return [];
-  }
-
-  const attachmentList = messageTabMenu.querySelector<HTMLElement>(".formAttachmentContent > .formAttachmentList");
-  if (!attachmentList) {
-    return [];
-  }
-
-  return Array.from(attachmentList.querySelectorAll<HTMLElement>('.formAttachmentListItem[data-is-image="1"]')).map(
-    (listItem) => parseInt(listItem.dataset.objectId!),
-  );
-}
-
 export function setup(element: HTMLElement): void {
   listenToCkeditor(element).setupConfiguration(({ configuration, features }) => {
     if (!features.attachment) {
       return;
     }
-
-    const inlineImageIds = getInlineImageIds(element);
-
-    configuration.woltlabAttachment = {
-      inlineImageIds,
-    };
     configuration.woltlabUpload = {
       uploadImage: (file: File, abortController: AbortController) => uploadAttachment(element, file, abortController),
       uploadOther: (file: File) => uploadAttachment(element, file),