最近搜索
没有最近搜索

Christopher Kennedy
已加入2021年4月14日
·
最后活动2025年2月13日
关注
0
关注者
3
活动总数
802
投票
0
订阅
337
活动概览
标记
文章
帖子
社区评论
文章评论
活动概览
的最新活动 Christopher Kennedy
Christopher Kennedy 进行了评论,
Thanks for the context. The plan level is an issue here for sure. Custom business rules are not available on the Legacy Support Essential plan. I recommend a plan upgrade to take advantage of this feature set.
查看评论 · 已于 2025年2月13日 发布 · Christopher Kennedy
0
关注者
0
投票
0
评论
Christopher Kennedy 进行了评论,
0
关注者
0
投票
0
评论
Christopher Kennedy 进行了评论,
Can you share some more context:
- Are you building a server-side Zendesk app? Or client-side app?
- How are you including MSAL? And how are you detecting that it's failing to initialize?
查看评论 · 已于 2024年12月20日 发布 · Christopher Kennedy
0
关注者
0
投票
0
评论
Christopher Kennedy 进行了评论,
0
关注者
0
投票
0
评论
Christopher Kennedy 进行了评论,
You can actually include HTML links in the value when using
ticket.editor.insert
. However, whether or not it is supported depends on the ticket channel. Live channels like chat and messaging do not support rich text replies, while other channels (web form, email, etc) do. That's really what accounts for the discrepancy in behavior that you're seeing. You can always use the ticket.editor.capabilities object to check whether the current channel supports rich text before performing the insert.查看评论 · 已于 2024年12月18日 发布 · Christopher Kennedy
0
关注者
0
投票
0
评论
Christopher Kennedy 进行了评论,
Hi Simon,
Thanks for the context. Sorry for the missed reply! Since you're just building an article excerpt, the simplest approach is to just pull the text from the returned article JSON body. This is easier to accomplish in vanilla JS using DOMParser() and innerText. For example, where you're currently sanitizing HTML:
let parser = new DOMParser();
let doc = parser.parseFromString(html, "text/html");
let text = doc.body.innerText;
return text;
This would return just the article body text without having to first load the body content, images, etc to the DOM before sanitizing.
Also to limit the number of articles returned by your API request, take advantage of pagination to set the max article count in the response to 6. For example:
const url = `${hcUrl}/api/v2/help_center/sections/${sectionId}/articles.json?page[size]=6`;
查看评论 · 已于 2024年12月05日 发布 · Christopher Kennedy
0
关注者
0
投票
0
评论