【问题标题】:Post a bookdown folder to microsoft teams将 bookdown 文件夹发布到 Microsoft 团队
【发布时间】:2021-06-13 02:58:27
【问题描述】:

创建一个团队选项卡,其网页内容是链接的 html/aspx 文档的文件夹,其中“登录页面”是 index.html/aspx。

我希望 网络内容(如下所示)成为我上传给团队的链接 html/aspx 文档的文件夹。 (不是外部托管的网页。)

Tabs are Teams-aware webpages embedded in Microsoft Teams. They are simple
 HTML <iframe> tags that point to domains declared in the app manifest and 
can be added as part of a channel inside a team, group chat, or personal 
app for an individual user. You can include custom tabs with your app to 
embed your own web content in Teams or add Teams-specific functionality to 
your web content.

在这里我记录了我试图解决这个问题的方法,欢迎指点,即使是教程。

我想在 Teams 选项卡中包含由 RStudio Bookdown https://bookdown.org/ 创建的“书”。 Bookdown 创建一个 index.html HTML 文档和其他 HTML 与相关链接相关的文档。 r包由Yihui Xie创建。 Microsoft 建议创建内容页面:https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/create-tab-pages/content-page 此页面声明

A content page is a webpage that is rendered within the Teams client

这似乎暗示这是可以做到的。

For your page to display in Teams, you must include the Microsoft Teams 
JavaScript client SDK and include a call to microsoftTeams.initialize() 
after your page loads. That is how your page and the Teams client 
communicate:

MS 文档指出结尾应该是aspx 而不是html&lt;head&gt; 部分中应该有 &lt;script src= 'https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js'&gt;&lt;/script&gt; 行。这是针对“团队客户端 JavaScript SDK”的,microsoftTeams.initialize(); 行也需要在 script 部分中。

我创建了一个 Hello World 文档,其中包含示例中列出的内容:

<!DOCTYPE html>
<html>
<head>

    <script src= 'https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js'></script>

</head>

<body>

    <script>
    microsoftTeams.initialize();
    </script>

</body>

如果您可以将该页面加载到 Teams 中的选项卡并使其处于活动状态,而无需用户“下载”,请告诉我您是如何做到的。

还有一件我力不从心的作品:

Ensure that the all URL domains used in your tabs are included in the validDomains array in your manifest. For more information, see validDomains in the manifest schema reference. However, be mindful that the core functionality of your tab exists within Teams and not outside of Teams.

有人做过吗?你能告诉我怎么做吗?

当然,如果这个想法走错了方向并且有更好的方法,也请告诉我。

谢谢。

【问题讨论】:

  • 嗨@Harlan Nelson 您是要创建团队配置选项卡还是个人选项卡? Teams 不允许其他租户域。要允许,您需要在 Manifest Valid Domains 数组中添加这些域。 `“validDomains”:[“contoso.com”、“mysite.someplace.com”、“othersite.someplace.com”]`
  • 您可以创建config tabdeep link 概念将帮助您在标签中呈现html页面
  • @Sridevi-MSFT 谢谢,我会研究这些链接并试一试。

标签: html r microsoft-teams bookdown


【解决方案1】:

您可以创建config tabdeep link 概念将帮助您在选项卡中呈现html 页面

Teams 不允许其他租户域。要允许,您需要在 Manifest Valid Domains 数组中添加这些域。

"validDomains": [ "contoso.com", "mysite.someplace.com", "othersite.someplace.com" ].

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-18
    • 2021-06-12
    • 1970-01-01
    • 2020-02-21
    • 2019-02-22
    • 1970-01-01
    相关资源
    最近更新 更多