带有新发布的 office.js API 的 Outlook for Mac 加载项 [英] Outlook for Mac add-in with the newly released office.js API
问题描述
我们有一个 Office Apps 插件 - 在日历中的 Outlook 约会中使用撰写表单.
We have an add-in for Office Apps - using the compose form on Outlook appointments in the calendar.
因为对于 Outlook for Mac 的 office.js 加载项支持终于按原样发布 这里,我有一些问题:
Because finally the office.js add-ins support for Outlook for Mac is out as written here, I have some questions:
- 如何在 Outlook for Mac 的加载项侧窗格中调试 JS?由于行为有时与 Outlook Web 不同
Office.context.mailbox.item.body.setAsync(newBody, { coercionType: Office.CoercionType.Html }, callback)
似乎什么都不做,只针对Office.CoercionType.文字
它似乎工作- 是否可以在浏览器中打开网页而不是模式窗口?因为
window.open(url, target, features)
在约会顶部打开一个模态窗口,这又是与 Outlook Web Client 不同的行为 - 看起来 JS 在 Outlook for Mac 中要慢得多
- How can I debug the JS in the add-in side pane in Outlook for Mac? Since the behavior is sometimes different to Outlook Web
Office.context.mailbox.item.body.setAsync(newBody, { coercionType: Office.CoercionType.Html }, callback)
seems to do nothing, only forOffice.CoercionType.Text
it seems to work- Is it possible to open a web page in the browser instead of a modal window? Because
window.open(url, target, features)
opens a modal window on top of the appointment, which is again different behavior to Outlook Web Client - It looks like JS is much slower in Outlook for Mac
推荐答案
问题 #1MacOutlook 使用 webkit 来呈现插件页面.您可以从 CLI
Question #1 MacOutlook uses webkit to render addin page. You can run the following command from CLI
默认写 NSGlobalDomain WebKitDeveloperExtras -bool true
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
重新启动 Outlook 并调用加载项.您将看到新的菜单项检查元素,它可以让您检查页面中的元素.
Restart the outlook and invoke the Add-in. You will see new menu item inspect Element which will let you inspect the elements in the page.
问题 3:如果要在 appmanifest 中未列出的域中打开 URL,则该 URL 将在单独的浏览器窗口中打开.要打开的 url 在 appmainfest 中列出的域中,您将看到一个弹出窗口.由于当前使用的 webkit 库的限制,MacOutlook 使用模态窗口.
Question #3: If the URL to be opened in a domain that is not listed in appmanifest, the URL will be opened in a separate browser window. The url to be opened is in the domain listed in appmainfest, you will see a popup window. MacOutlook uses modal window due to the limitations of webkit library currently being used.
问题 2:您能否给出重现问题的具体步骤并分享您正在使用的 Outlook 版本 - 我们没有看到此问题
Question #2 : Can you give specific steps to reproduce the problem and share the Outlook version that you are using - We do not see this problem
森蒂尔@微软
这篇关于带有新发布的 office.js API 的 Outlook for Mac 加载项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!