Codemirror6 drag and drop the contents of the file to the editor

Hello, in codemirror 5, you can drag a [XXX. MD] file directly to the editor. The editor will automatically recognize the file content and append it to the editor. But in codemirro6, I didn’t find any related extensions. Can you help me, thank you

That hadn’t been implemented yet, but this patch should add it.

1 Like

very thanks

Is there a way to disable this feature? @marijn

It should be possible to register a drop event handler that checks whether there are files you don’t want dropped in the event’s files list, and calls preventDefault on it if that is the case.

1 Like