So basically, I want to be able to drag and drop inline images into Google Docs. The only issue is that I can't figure out how to store these images in the UI or prevent people from dragging and dropping the actual icon as opposed to the inline image. The image needs to be inline because there is linkUrl set to it and I cannot figure out how to retain this property through a drag and drop. Is it possible to do this? If so how?
Asked
Active
Viewed 575 times
0
-
You want to drag them from the Doc's sidebar Ui into the Doc? – Bryan P Oct 09 '13 at 23:36
-
But it has to be an inline image so the URL can still be attached. Unless I can programatically add the URL to the image after it has appended. – Skylion Oct 09 '13 at 23:37
1 Answers
0
Don't think drag-n-drop functionality is available from the sidebar Ui to inside the Doc, but you could try using insertImage() with setLinkUrl() so that when you click on an icon in the sidebar it's corresponding image gets inserted by the script into the Doc.

Bryan P
- 5,031
- 3
- 30
- 44
-
-
You can append to the [cursor](https://developers.google.com/apps-script/reference/document/cursor) location. – Bryan P Oct 10 '13 at 16:54
-
-
-
Actually, I just came across this [Research](https://support.google.com/drive/answer/2481802?hl=en&p=documents_research) sidebar feature. That will allow you to drag and drop images. I don't have a code example on how to do it yet. – Bryan P Nov 09 '13 at 15:25