Open DmitryKostochko opened 4 years ago
Thanks for reporting this issue regarding setSelectedDataAsync. It has been put on our backlog. We unfortunately have no timelines to share at this point.
@gergzk, please reopen the issue. The bug is still reproducible in Outlook Desktop and Outlook for Mac.
In an Outlook add-in for compose mode, we use the Office JS API to fill in email fields. The setSelectedDataAsync method inserts HTML with incorrect markup, the caption of a table is filled with the background color of the table.
Expected Behavior
The table's caption shall not take the background color of the table.
Current Behavior
The caption is filled with the table's background color.
Steps to Reproduce, or Live Example
Create a new email in Outlook Desktop or Outlook for Mac and execute the code below.
Office.context.mailbox.item.body.setSelectedDataAsync(
'<table style="border-collapse: collapse; width: 100%; background-color: #70ad47; border-style: solid;" border="1"><caption>caption</caption>' +
' <tbody>' +
' <tr>' +
' <td style="border-style: solid; width: 50%;"> </td>' +
' <td style="border-style: solid; width: 50%;"> </td>' +
' </tr>' +
' </tbody>' +
'</table>',
{ coercionType : 'html' },
(asyncResult) => { }
);
Your Environment
Useful logs