-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Add drop into editor API #142990
Comments
I have a prototype but need to think more about what the design should look like. Biggest question I have right now: Should we allow there to be multiple of these drop handlers active at one time? We do want to allow there to be multiple drop handlers where each one handles a different dropped mime type, but what about multiple handlers for a single mime type? In markdown for example, you can imagine having one drop handler that creates links and another that creates image links If we did allow this, presumably we then need some way for the user to control what happens on drop, either with a setting to configure the default or by presenting a list of actions to them Answering this helps determines if we go with more of a provider style api or more of an event api |
#142990 This prototypes a semi-provider based api handle dragging and dropping. I went with this approach over a purely event based one because: - Most extensions will likely only care about a specific language - It gives us more structure to handle what happens if there are multiple drag and drop providers active. This prototype doesn't handle this at all, but you can imagine getting shown ui to select the action when the drop happens
#142990 This prototypes a semi-provider based api handle dragging and dropping. I went with this approach over a purely event based one because: - Most extensions will likely only care about a specific language - It gives us more structure to handle what happens if there are multiple drag and drop providers active. This prototype doesn't handle this at all, but you can imagine getting shown ui to select the action when the drop happens
* Add drop into editor api proposal For #142990 * Use AsyncEmitter
@misolori @sbatten I've added some basic prompt text to the drop overlay: Untitled.movThis text only shows up when you are dropping into the whole editor. It hides itself if the drop is previewing a split (however holding down shift still lets you enter "drop into editor" mode) Let me know what you think about this behavior. I also think we need to make the |
This updates the text editor drop proposal (microsoft#142990). This change introduces `DocumentDropEdit` which removes the need for `SnippetTextEdit`. This interface may also be extended in the future with additional metadata
This updates the text editor drop proposal (#142990). This change introduces `DocumentDropEdit` which removes the need for `SnippetTextEdit`. This interface may also be extended in the future with additional metadata
Exploration of dragging a file from VS Code's explorer into an editor to create a link. Example use case would be dragging a file into a markdown editor to insert a link
The text was updated successfully, but these errors were encountered: