OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
683 stars 95 forks source link

Using prependAsync changes the formatting of the text to Calibri 11 (macOS "new" Outlook) #2696

Closed shff closed 1 year ago

shff commented 2 years ago

Using prependAsync in HTML mode changes the formatting of the text to Calibri 11.

Your Environment

Expected behavior

The font should not change.

Current behavior

The font changes to Calibri 11, even though the default is something else.

Steps to reproduce

  1. Change the Outlook for macOS default Compose Font to something other than Calibri 11pt.
  2. Create a new message. The font of the message will be the one chosen above.
  3. Run the shared snippet.
  4. The font of the me changes to Calibri 11pt

Link to live example(s)

ScriptLab Script: https://gist.github.com/shff/68dd8db3a4d14ca5e24d0022fafe92aa

Context

I'm trying to add text using the API.

I'm using it in the simplest possible way to add HTML (I'm adding a text string here as an example but I do use it to add HTML in a real case scenario).

Office.context.mailbox.item.body.prependAsync("hello", { coercionType: Office.CoercionType.Html });

Useful logs

Before Clicking "Run"

Screenshot 2022-07-07 at 16 55 01

After Clicking "Run"

Screenshot 2022-07-07 at 16 55 18
exextoc commented 2 years ago

Thanks for reporting this issue. It has been put on our backlog. We unfortunately have no timelines to share at this point.

Internal tracking id: Office: 6239410

bchenhs commented 1 year ago

@exextoc Hi, we have a large number of users reporting the same issue. Can we escalate to address this issue? This font change issue also accompany performance degradation, rendering the add-on practically unusable. Thank you.

exextoc commented 1 year ago

Thank you for raising the issue. We are working on this right now. Unfortunately, we don't have any timelines to share with you at the moment.