You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add custom logic in my plugins about what to do with files dropped into view. Examples of house this could be used include:
adding a relative path to an image file in your html text
creating a phantom inside the view with a hyperlink to a website
Preferred solution
Add drop hooks in the EventListener to allow plugins to define custom behavior when a file is dragged in. Maybe something like on_drop(view: View)
Alternatives
There are ways to work around this, such as a context menu "import" option, but drag and drop is a fully new capability in the api as far as I can tell.
I did a quick search through the api, the forums, and the github issues but didn't find anything related to drag and drop and the api, except for in regards to the file tree sidebar #16.
The text was updated successfully, but these errors were encountered:
Problem description
I would like to add custom logic in my plugins about what to do with files dropped into view. Examples of house this could be used include:
Preferred solution
Add drop hooks in the EventListener to allow plugins to define custom behavior when a file is dragged in. Maybe something like
on_drop(view: View)
Alternatives
There are ways to work around this, such as a context menu "import" option, but drag and drop is a fully new capability in the api as far as I can tell.
Additional Information
I originally posted this in the forums over at https://forum.sublimetext.com/t/drag-and-drop-hooks-in-api/64479.
I did a quick search through the api, the forums, and the github issues but didn't find anything related to drag and drop and the api, except for in regards to the file tree sidebar #16.
The text was updated successfully, but these errors were encountered: