【发布时间】:2018-07-25 22:55:51
【问题描述】:
我使用 nodeJs 使用 Microsoft 的 bot 服务(Bot 框架)创建了 Bot。
纯文本时它工作正常,但是当我尝试使用以下方法返回 HTML 表格时
eg.
var tableHTML = '<table style="padding:20px;border:1px solid black; border-collapse: collapse;" border=1 border-collapse=collapse><tr style="background-color:#c6c6c6"><th>Countries</th><th>Capitals</th><th>Population</th><th>Language</th></tr><tr><td>USA</td><td> Washington D.C.</td><td>309 million</td><td>English</td></tr><tr><td>Sweden</td><td>Stockholm</td><td>9 million</td><td>Swedish</td></tr></table>';
var message = {
type: 'message',
textFormat: 'xml',
text: tableHTML
};
session.send(message);
它在 Skype for business 桌面 APP 上对我有用,但在 Skype for business 移动 APP 上不起作用(它不返回任何内容)
目前我在 Skype for business 上为移动设备渲染 HTML 表格时遇到问题
Skype for business 移动应用支持机器人中的 HTML ??
如果有人对此有解决方案,请提供
谢谢
【问题讨论】:
-
也许你应该试试 textFormat: 'html' ?
-
@Sparw 不,这不是 Bot Framework 中的有效 textFormat 值
-
即使这个链接的问题是关于网络聊天频道的,我提供的回复对你的问题仍然有效,有点重复:stackoverflow.com/questions/48148447/…
-
@Sparw type html 不在机器人框架的文档中
标签: node.js azure bots botframework skype