-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat(image-upload): dispatch event for intercepting image upload flow #249
Conversation
✅ Deploy Preview for stacks-editor ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
This looks great. Only thing that missing that we would probably need is the ability to inject a modal workflow into the place where you have the confirmation js. Basically, we will want to intercept the image, upload it to extract the code, and then show the code (with syntax highlighting) to the user before adding it (which can be done in a modal). If we can have some sort of a callback that we could hook into where we would put in a function that would open the modal, and then be able to either exit the process or give code to inject, would be ideal. |
@yellis Our recommendation would be for your team to own and author the |
Summary
Dispatch a custom event on image upload to allow plugin authors to pause the upload flow and decide to either abort or resume it based on async operations.
How to test
http://localhost:8080/plugins.html
or the PR deploy previewOpen Todos