How can I make the drop event take effect

Example: nostalgic-sky-7wssh6 - CodeSandbox

I tried dragging a file into input area.
But only the dragenter and dragover events were triggered

You don’t seem to have a handler for drop events. When I add that I can see them just fine.

I found a related topic, the example in it is as follows

  view.scrollDOM.addEventListener('drop', (event) => {

It works.

But wouldn’t it work as an extension like this

const view = new EditorView({
    doc: '',
    parent: inputWrapperRef.value,
    extensions: [
        drag: (e) => {
          console.log('drag', e);

You’re still adding a drag handler, not a drop handler.

Sorry, my fault. Thanks for your response