Skip to content

Type Editor


Type Editor / @type-editor/menu / menu-items/util/drag-drop-helper

menu-items/util/drag-drop-helper

Interfaces

InterfaceDescription

DragDropListenerOptions

Options for configuring drag-drop listeners.

Variables

VariableDescription

COMMON_ELEMENT_IDS

Common element IDs used across file upload dialogs. These IDs are shared between image-item and file-upload-item.

Functions

FunctionDescription

createDropZoneHtml

Creates HTML for a drop zone with file input.

extractFilesFromDropEvent

Extracts File objects from a drop event.

getFileItemsFromDragEvent

Extracts file items from a drag event.

hasImageFiles

Checks if any file item is an image.

setupDragDropListeners

Sets up drag-and-drop event listeners for file uploads.

This function configures:

  • Window-level drop prevention to avoid accidental file opens
  • Drop zone handlers for drag-and-drop file uploads
  • Dragover handlers for visual feedback during drag operations