Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to drag multiple files into the toast UI editor? #3272

Open
alexoracle opened this issue Sep 30, 2024 · 0 comments
Open

How to drag multiple files into the toast UI editor? #3272

alexoracle opened this issue Sep 30, 2024 · 0 comments
Labels

Comments

@alexoracle
Copy link

alexoracle commented Sep 30, 2024

Summary

I am using the Toast UI editor and I am trying to figure out how to drag and drop multiple images at once. I see there is a toolbar items that allows adding images but there you could only add once at a time. I also added a hook to be able to be able to drag images:

<Editor 
  ...
 hooks={{
            addImageBlobHook: async (blobs: File, callback) => {
              var blobArray = Array.isArray(blobs) ? blobs : [blobs];
              onImageUpload && onImageUpload(blobArray);
            },
          }}
  ...
/>

But addImageBlobHook only allows a single File type, so when I drag more than 1 file, only the first gets added. Is there a way to drag and drop more than 1 image?

Version

"@toast-ui/react-editor": "^3.2.3"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant