I'm trying to create a Google Docs add-on in which someone:
- Selects an image
- Clicks a menu item
- A dialog is displayed, showing the image (on a canvas) with a couple tools
- Canvas is modified using tools
- Canvas data is saved and replaces the original image
- Meta data for the image is saved, so it can be re-edited from the original.
I know how to get the image selection (from the GS code) and trigger the menu item and dialog. I also know how to do all of my custom code things.
I need to know:
- How to get the original image URL (or extract it as a base64 string) that I can put in to a canvas
- Replace the image and save it in the document.
- Save metadata on a per-image basis so it can be re-edited.
Examples would be awesome, though links to documentation would also be great. I've found a lot of things, but nothing concrete on how to extract the data as anything but a blob.