How to drag content of document from task pane to word

187 Views Asked by At

I have created a word add-in. In the add-in there is a list of documents available. I just want to implement drag and drop functionality in the add-in. like when user drag the document from task pane to word then content of document should be display in the word. I have checked the documents online but there is nothing about this functionality.

Is drag and drop is possible in the word add-in?

Document Image

1

There are 1 best solutions below

0
On BEST ANSWER

For directly realizing the drag and drop event, I think we don't provide such an API to detect the drop event in doc. But as a workaround, maybe we can implement a "+" button to insert the content to the selection.

For inserting the content in document, we have such JS API called Body.insertFileFromBase64()