【问题标题】:Is there a way to change web chat font size in IE11有没有办法在 IE11 中更改网络聊天字体大小
【发布时间】:2019-08-13 22:15:36
【问题描述】:

我在所有浏览器的直线频道上创建了一个聊天机器人,包括 IE11。

我需要更改用户和机器人消息的字体大小。我已经找到了一种方法可以对所有浏览器(除了 IE11)执行此操作(由于 ES5)。

我试图找到方法来做到这一点;包括在 defaultStyleOptions.js 中寻找 styleOptions

https://github.com/microsoft/BotFramework-WebChat/blob/master/packages/component/src/Styles/defaultStyleOptions.js

没有可用的选项。

但是,在 WebChat 的 createSetStyle 方法中有一个选项允许更改字体大小。

const styleSet = window.WebChat.createStyleSet({});

styleSet.textContent = {
    fontSize: '24px'
};

window.WebChat.renderWebChat({
    directLine: window.WebChat.createDirectLine({token: conversationToken}),
    styleSet
}, document.getElementById("chatbot-display"));

虽然此选项在 IE11 (ES5) 中工作

我希望能够找到一个允许我更改聊天消息文本字体大小的选项。即字体大小:12px。

【问题讨论】:

标签: azure botframework web-chat


【解决方案1】:

我无法从 WebChat 中找到执行此操作的方法。

但是,我找到了解决办法。

.bubble {
font-size: 24px !important;
}

【讨论】:

    猜你喜欢
    • 2017-06-12
    • 1970-01-01
    • 2018-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多