@@ -11153,6 +11153,141 @@ Office.DisplayedSubject#setAsync:member(2):
1115311153
1115411154 console.log("Temporarily set the content displayed in the subject field.");
1115511155 });
11156+ Office.DragAndDropEventArgs:interface:
11157+ - >-
11158+ // Link to full sample:
11159+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
11160+
11161+
11162+ function dragAndDropEventHandler(event) {
11163+ Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
11164+ console.log(`Event type: ${event.type}`);
11165+
11166+ const eventData = event.dragAndDropEventData;
11167+ console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
11168+
11169+ if (eventData.type == "drop") {
11170+ console.log("Items dropped into task pane.");
11171+ const files = eventData.dataTransfer.files;
11172+ files.forEach((file) => {
11173+ const content = file.fileContent;
11174+ const name = file.name;
11175+ const fileType = file.type;
11176+ console.log(`File name: ${name}`);
11177+ console.log(`File type: ${fileType}`);
11178+ console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
11179+ });
11180+ }
11181+ });
11182+ }
11183+ Office.DragoverEventData:interface:
11184+ - >-
11185+ // Link to full sample:
11186+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
11187+
11188+
11189+ function dragAndDropEventHandler(event) {
11190+ Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
11191+ console.log(`Event type: ${event.type}`);
11192+
11193+ const eventData = event.dragAndDropEventData;
11194+ console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
11195+
11196+ if (eventData.type == "drop") {
11197+ console.log("Items dropped into task pane.");
11198+ const files = eventData.dataTransfer.files;
11199+ files.forEach((file) => {
11200+ const content = file.fileContent;
11201+ const name = file.name;
11202+ const fileType = file.type;
11203+ console.log(`File name: ${name}`);
11204+ console.log(`File type: ${fileType}`);
11205+ console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
11206+ });
11207+ }
11208+ });
11209+ }
11210+ Office.DropEventData:interface:
11211+ - >-
11212+ // Link to full sample:
11213+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
11214+
11215+
11216+ function dragAndDropEventHandler(event) {
11217+ Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
11218+ console.log(`Event type: ${event.type}`);
11219+
11220+ const eventData = event.dragAndDropEventData;
11221+ console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
11222+
11223+ if (eventData.type == "drop") {
11224+ console.log("Items dropped into task pane.");
11225+ const files = eventData.dataTransfer.files;
11226+ files.forEach((file) => {
11227+ const content = file.fileContent;
11228+ const name = file.name;
11229+ const fileType = file.type;
11230+ console.log(`File name: ${name}`);
11231+ console.log(`File type: ${fileType}`);
11232+ console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
11233+ });
11234+ }
11235+ });
11236+ }
11237+ Office.DroppedItems:interface:
11238+ - >-
11239+ // Link to full sample:
11240+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
11241+
11242+
11243+ function dragAndDropEventHandler(event) {
11244+ Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
11245+ console.log(`Event type: ${event.type}`);
11246+
11247+ const eventData = event.dragAndDropEventData;
11248+ console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
11249+
11250+ if (eventData.type == "drop") {
11251+ console.log("Items dropped into task pane.");
11252+ const files = eventData.dataTransfer.files;
11253+ files.forEach((file) => {
11254+ const content = file.fileContent;
11255+ const name = file.name;
11256+ const fileType = file.type;
11257+ console.log(`File name: ${name}`);
11258+ console.log(`File type: ${fileType}`);
11259+ console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
11260+ });
11261+ }
11262+ });
11263+ }
11264+ Office.DroppedItemDetails:interface:
11265+ - >-
11266+ // Link to full sample:
11267+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/80-events/drag-drop-item.yaml
11268+
11269+
11270+ function dragAndDropEventHandler(event) {
11271+ Office.context.mailbox.addHandlerAsync(Office.EventType.DragAndDropEvent, (event) => {
11272+ console.log(`Event type: ${event.type}`);
11273+
11274+ const eventData = event.dragAndDropEventData;
11275+ console.log(`x-coordinate: ${eventData.pageX}, y-coordinate: ${eventData.pageY}`);
11276+
11277+ if (eventData.type == "drop") {
11278+ console.log("Items dropped into task pane.");
11279+ const files = eventData.dataTransfer.files;
11280+ files.forEach((file) => {
11281+ const content = file.fileContent;
11282+ const name = file.name;
11283+ const fileType = file.type;
11284+ console.log(`File name: ${name}`);
11285+ console.log(`File type: ${fileType}`);
11286+ console.log(`Contents: ${content.text().then((text) => { console.log(text); })}`);
11287+ });
11288+ }
11289+ });
11290+ }
1115611291Office.EnhancedLocation#addAsync:member(1):
1115711292 - >-
1115811293 // Link to full sample:
0 commit comments