outlook - 在 displayNewAppointmentForm Office.js 中插入 HTML
问题描述
我一直在开发一个 Office.js 加载项,它会根据之前保存的一些设置自动生成一些文本。此文本是可编辑的。
我将 CKEDITOR v4.14 用于富文本编辑器。但是,当我单击“Planlegg møte”(计划会议)时,文本本身会以纯文本、HTML 标记等形式粘贴到 displayNewAppointmentForm 对象中。没有发生转换。
关闭对话框后,我通过在关闭对话框后和完成按钮单击事件之前调用以下命令来创建新约会:
dialog.close();
dialog = null;
setTimeout(() => {
Office.context.mailbox.displayNewAppointmentForm({
location: 'https://' + settings.data.domain + '.easymeeting.net/' + settings.data.number,
subject: 'Easymeeting videomøte',
requiredAttendees: [],
optionalAttendees: [],
resources: [Office.context.mailbox.userProfile.emailAddress],
body: settings.data.message,
});
}, 500);
btnEvent.completed();
btnEvent = null;
在初始化新的约会表单后,我还尝试通过调用 Office.context.document.setSelectedDataAsync 来设置正文,但在 PC 上的 Outlook 客户端上似乎很少发生。
是否可以在 displayNewAppointmentForm 正文中插入 HTML 或其他格式的消息(例如使用换行符“\n”)?
解决方案
您可以使用特殊字符,例如\n
和\t
,但目前还不能使用 HTML。我们在 <a href="https://officespdev.uservoice.com/forums/224641-general/category/131778-outlook-add-ins" rel="nofollow noreferrer">user- 上跟踪 Outlook 加载项功能请求语音页面。
看起来您想要的功能已经被其他人请求了。请支持现有的请求displayNewAppointmentForm
。当我们进行规划过程时,会考虑用户语音的功能请求。
推荐阅读
- node.js - 捕获错误 401 adonis.js 错误 E_INVALID_SESSION: Invalid session
- angular - 使用 Ahead-of-Time 编译时如何更改 Angular 的插值字符?
- machine-learning - PyTorch 中的 torch.optim.SGD 结果为 NaN
- google-kubernetes-engine - 每个客户是否应该拥有自己的 Kubernetes 集群
- php - Laravel - 使用表单更新多行值
- reactjs - React Navigation:在抽屉上滑动让我的抽屉在移动时卡住了
- visual-studio-code - MacOS Mojave 上的 VSC Prolog 错误:“找不到可执行文件的路径”
- sql - SQL查询从键表中选择多个条目到同一行的不同列中
- cloudant - 使用 cloudant 条目建立两个摄像头的平均速度数据库
- computer-science - 什么算法可以找到无根非二叉树的直径?