Closed DmitryKostochko closed 2 months ago
Thank you for the additional context. We are reaching out to the Microsoft Word team for additional guidance and awaiting their response. Internal tracking ID: 5401672
Please reopen the case because the bug is still reproducible in Outlook version 2406 (Build 17726.20126).
Provide required information needed to triage your issue
In an Outlook add-in for compose mode, we use the item.body.setSelectedDataAsync() method to insert HTML in the body of an item. The setSelectedDataAsync() inserts 11pt text instead of 12pt.
Your Environment
Expected behavior
The setSelectedDataAsync method shall insert HTML with the specified text size.
Current behavior
The setSelectedDataAsync method ignores the style attribute and inserts text with a font size of 11pt.
Steps to reproduce
Open the add-in's pane and execute the following code:
Office.context.mailbox.item.setSelectedDataAsync("<p class=\"MsoNormal\"><span style=\"font-size: 12pt; font-family: 'Times New Roman', Times, serif;\">Must be Times New Roman, 12pt.</span></p>", { coercionType : "html"
})`As you can see, the font family was applied, but the font size was ignored.
Provide additional details
Useful logs