0
votes

I've been working on a Office.js add-in that automatically generates some text depending on a few previously saved settings. This text is editable.

I'm using CKEDITOR v4.14 for the rich-text editor. However, when I click "Planlegg møte" (Plan meeting), the text itself is pasted into the displayNewAppointmentForm object as plain-text, HTML tags and all. No conversion is happening.

Upon closing the dialog box, I'm creating the new appointment by caling the following after closing the dialog and before completing the button click event:

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;

I also tried setting the body by calling Office.context.document.setSelectedDataAsync after initializing the new appointment form but it seems very little is happening on the Outlook client on PC.

Is it possible to insert a message as HTML or otherwise formatted (with newline "\n" for example) in the displayNewAppointmentForm body?

1
Looks like this feature has not been implemented. Here is the user-voice link for it: officespdev.uservoice.com/forums/… - Brian Clink
Thanks a lot. I've gone ahead and put my votes against the features I'd like to see come to Office.js - Dixos

1 Answers

2
votes

You are able to use special characters such as \n and \t, however HTML is not possible today. We track Outlook add-in feature requests on our user-voice page.

It looks like the feature you want has been requested by others already. Please upvote the existing request displayNewAppointmentForm. Feature requests on user-voice are considered when we go through our planning process.