I played with the Office 365 add-in for MS word. I have a dialogue to manipulate the selected word. I need to pass this image (possibly Base64 value) into my dialog so that I can play with the image before replacing back to the word (in the same place).
I use the code below to show a popup:
Office.context.ui.displayDialogAsync("https://" + location.host + "/Views/ImageManager.html", { width: 64, height: 55, requireHTTPS: true }, function (asyncResult) {
dialog = asyncResult.value;
dialog.addEventHandler(Office.EventType.DialogMessageReceived, processMessage);
if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) {
return;
}
});
The thing I wanted to do?
When the user selects any image to play with him in the word document and clicks the ribbon button to open this dialog box, I need to transfer this image to the dialog box that will be displayed in the dialog box.
How to transfer image model in a dialog box?