I am creating an Office 2013 app, using HTML & Javascript. I want to include one feature in the app, i.e., when the User clicks a certain button, the corresponding image gets inserted in the document. I tried this method..
HTML:
<button id="img-insert-btn">Insert Image</button>
jQuery:
$('#img-insert-btn').click(insertImage);
Javascript:
function insertImage() {
Office.context.document.setSelectedDataAsync("../ImageFolder/Image.png");
}
The method I wrote above, inserts that file path into the document, instead of inserting the image. Please help. P.S. jQuery can also be implied.